🐛 FIX: 关闭流后断开rtsp拉流或者推流连接

This commit is contained in:
dexter
2022-11-23 09:22:23 +08:00
parent 1206a4636f
commit 3cbf22576b

View File

@@ -45,6 +45,7 @@ func (p *RTSPPuller) Connect() error {
if err = p.Client.Start(u.Scheme, u.Host); err != nil {
return err
}
p.SetIO(p.Client)
return nil
}
@@ -107,6 +108,7 @@ func (p *RTSPPusher) Connect() error {
p.Error("Client.Start", zap.Error(err))
return err
}
p.SetIO(p.Client)
_, err = p.Client.Options(u)
return err
}