Fix busy RTSP backchannel

This commit is contained in:
Alexey Khit
2022-08-22 15:41:19 +03:00
parent a9af245ef8
commit 12b712426d
3 changed files with 27 additions and 11 deletions
+10 -1
View File
@@ -65,8 +65,17 @@ func rtspHandler(url string) (streamer.Producer, error) {
if err = conn.Dial(); err != nil {
return nil, err
}
conn.Backchannel = true
if err = conn.Describe(); err != nil {
return nil, err
// second try without backchannel, we need to reconnect
if err = conn.Dial(); err != nil {
return nil, err
}
conn.Backchannel = false
if err = conn.Describe(); err != nil {
return nil, err
}
}
return conn, nil