mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
add partial client read example; fix #16
This commit is contained in:
@@ -9,8 +9,8 @@ import (
|
||||
)
|
||||
|
||||
// This example shows how to
|
||||
// * connect to a RTSP server
|
||||
// * read all tracks on a path
|
||||
// 1. connect to a RTSP server
|
||||
// 2. read all tracks on a path
|
||||
|
||||
func main() {
|
||||
// connect to the server and start reading all tracks
|
||||
@@ -25,5 +25,7 @@ func main() {
|
||||
fmt.Printf("frame from track %d, type %v: %v\n", id, typ, buf)
|
||||
})
|
||||
|
||||
<-readerDone
|
||||
// catch any error
|
||||
err = <-readerDone
|
||||
panic(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user