Skip to content

Commit

Permalink
Negotiated codecs should not be restricted to first codec found
Browse files Browse the repository at this point in the history
  • Loading branch information
pougetat committed Dec 8, 2023
1 parent eed2bb2 commit 8169017
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mediaengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,10 @@ func (m *MediaEngine) updateFromRemoteDescription(desc sdp.SessionDescription) e
for _, media := range desc.MediaDescriptions {
var typ RTPCodecType
switch {
case !m.negotiatedAudio && strings.EqualFold(media.MediaName.Media, "audio"):
case strings.EqualFold(media.MediaName.Media, "audio"):
m.negotiatedAudio = true
typ = RTPCodecTypeAudio
case !m.negotiatedVideo && strings.EqualFold(media.MediaName.Media, "video"):
case strings.EqualFold(media.MediaName.Media, "video"):
m.negotiatedVideo = true
typ = RTPCodecTypeVideo
default:
Expand Down

0 comments on commit 8169017

Please sign in to comment.