解决发布超时后,重连RTSP,无法播放的BUG

清空rtsp.processFunc数据,避免接收到流时,指向旧的track,导致新stream无法播放
This commit is contained in:
訾明华
2022-02-22 21:15:35 +08:00
committed by GitHub
parent 3764a26bbd
commit 68d0d9aa08

View File

@@ -42,6 +42,7 @@ func (rtsp *RTSPClient) PullStream(streamPath string, rtspUrl string) (err error
time.Sleep(time.Second * 5)
}
if rtsp.IsTimeout {
rtsp.processFunc = nil
go rtsp.PullStream(streamPath, rtspUrl)
}
}()