Skip to content

peerconnection: SetRemoteDescription should validate against inconsistent track and mimetypes #198

@tmatth

Description

@tmatth

Your environment.

  • Version: github.com/pion/webrtc/v3 v3.1.45 h1:pJpD9TSMqtWIAGKXmpRhFmsQrrMlNgRx0UX1fGHbfoY=
  • Browser: N/A

What did you do?

Using janus 0.x prior to this PR surfaced an issue where, when given a borked SDP where both rtx and opus were mapped to payload type 97, I was seeing a track with RtpCodecTypeAudio but mimetype video/rtx

More details here: meetecho/janus-gateway#3078 (comment)

And details on how to run Janus + Pion to test in general here: pion/example-webrtc-applications#120 (comment)

What did you expect?

SetRemoteDescription should probably error out on this kind of mismatch

What happened?

No errors and when receiving the track and switching on track.Kind() the track's mimetype was video/rtx, and I only caught this when I started parsing the mimetype (whereas previously I'd assumed it had to be Opus).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions