Don't return bind error on unsupport codec (#3085)

pion will not start transports if Bind fails at first answer
This commit is contained in:
cnderrauber
2024-10-11 06:59:54 +00:00
committed by GitHub
parent cf59267631
commit 76bc112649

View File

@@ -444,7 +444,8 @@ func (d *DownTrack) Bind(t webrtc.TrackLocalContext) (webrtc.RTPCodecParameters,
if onBinding != nil {
onBinding(err)
}
return webrtc.RTPCodecParameters{}, err
// don't return error here, as pion will not start transports if Bind fails at first answer
return webrtc.RTPCodecParameters{}, nil
}
// if a downtrack is closed before bind, it already unsubscribed from client, don't do subsequent operation and return here.