remove ConnClient.CloseUDPListeners

This commit is contained in:
aler9
2020-11-08 19:48:18 +01:00
parent 4aa5848fba
commit 7c91f02459
3 changed files with 9 additions and 25 deletions

View File

@@ -13,6 +13,9 @@ import (
// read all tracks with the UDP protocol.
func main() {
var wg sync.WaitGroup
defer wg.Wait()
// connect to the server and start reading all tracks
conn, err := gortsplib.DialRead("rtsp://localhost:8554/mystream", gortsplib.StreamProtocolUDP)
if err != nil {
@@ -20,10 +23,6 @@ func main() {
}
defer conn.Close()
var wg sync.WaitGroup
defer wg.Wait()
defer conn.CloseUDPListeners()
for _, track := range conn.Tracks() {
// read RTP frames
wg.Add(1)