Skip to content

Default audio channels number #3127

@N1cOs

Description

@N1cOs

Your environment.

  • Version: v4.1.1 (also the same behaviour for latest master)

What did you do?

After updating Pion to version 4.1.1, we encountered an issue when using the G722 codec.
In PR #3021, logic was changed that codec matching is no longer based only on mimeType and fmtp parameters. Now it also checks the sample rate and number of channels.

In our case (and it's default for Chrome), sender in SDP announces a=rtpmap:9 G722/8000. According to RFC 4556 it indicates 1 channel:

For audio streams, <encoding parameters> indicates the number of audio channels. This parameter is OPTIONAL and may be omitted if the number of channels is one, provided that no additional parameters are needed.

However, current implementations of codecsFromMediaDescription use 0 channels as default. Should we align its logic with RFC?

What did you expect?

1 audio channel number after decoding SDP description for a=rtpmap:9 G722/8000

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions