Skip to content

Commit

Permalink
Occasionally, an attribute is omitted from the SDP. Even if payload t…
Browse files Browse the repository at this point in the history
…ype is described in media stream.
  • Loading branch information
jty016 committed Jan 19, 2024
1 parent c259e89 commit 0250ac4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sdp.go
Original file line number Diff line number Diff line change
Expand Up @@ -820,10 +820,7 @@ func codecsFromMediaDescription(m *sdp.MediaDescription) (out []RTPCodecParamete

codec, err := s.GetCodecForPayloadType(uint8(payloadType))
if err != nil {
if payloadType == 0 {
continue
}
return nil, err
continue
}

channels := uint16(0)
Expand All @@ -848,6 +845,9 @@ func codecsFromMediaDescription(m *sdp.MediaDescription) (out []RTPCodecParamete
PayloadType: PayloadType(payloadType),
})
}
if out == nil {
return nil, fmt.Errorf("no valid codecs found")
}

return out, nil
}
Expand Down

0 comments on commit 0250ac4

Please sign in to comment.