mirror of
https://github.com/Monibuca/plugin-rtsp.git
synced 2025-09-27 03:56:08 +08:00
feat: add sendoptions config to avoid send options
This commit is contained in:
@@ -60,10 +60,12 @@ func (p *RTSPPuller) Connect() error {
|
||||
func (p *RTSPPuller) Pull() (err error) {
|
||||
u, _ := url.Parse(p.RemoteURL)
|
||||
var res *base.Response
|
||||
if rtspConfig.SendOptions {
|
||||
if res, err = p.Options(u); err != nil {
|
||||
p.Error("Options", zap.Error(err))
|
||||
return
|
||||
}
|
||||
}
|
||||
p.Debug("Options", zap.Any("res", res))
|
||||
// find published tracks
|
||||
session, res, err := p.Describe(u)
|
||||
@@ -126,7 +128,9 @@ func (p *RTSPPusher) Connect() error {
|
||||
return err
|
||||
}
|
||||
p.SetIO(p)
|
||||
if rtspConfig.SendOptions {
|
||||
_, err = p.Client.Options(u)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user