fix: pull reuse puller but not tracks

This commit is contained in:
langhuihui
2023-11-21 18:59:05 +08:00
parent f41ff387ba
commit db2dbf06ef
2 changed files with 10 additions and 10 deletions
+5
View File
@@ -88,6 +88,11 @@ func (pub *Puller) startPull(puller IPuller) {
puller.Error("pull publish", zap.Error(err))
return
}
if stream != puber.Stream {
// 老流中的音视频轨道不可再使用
puber.AudioTrack = nil
puber.VideoTrack = nil
}
stream = puber.Stream
badPuller = false
if err = puller.Pull(); err != nil && !puller.IsShutdown() {