Skip to content
Snippets Groups Projects
Commit d99e3fff authored by Boris Grozev's avatar Boris Grozev
Browse files

Prevents the two-channel opus format from bumping MAX_AUDIO_CHANNELS to 2.

parent d79447fa
No related branches found
No related tags found
No related merge requests found
......@@ -347,6 +347,12 @@ public class MediaUtils
AudioMediaFormatImpl audioMediaFormat
= (AudioMediaFormatImpl) mediaFormat;
int channels = audioMediaFormat.getChannels();
/*
* The opus/rtp format has 2 channels, but we don't want it to
* trigger use of 2 channels elsewhere.
*/
if ("opus".equals(audioMediaFormat.getEncoding()))
channels = 1;
double sampleRate = audioMediaFormat.getClockRate();
int sampleSizeInBits
= audioMediaFormat.getFormat().getSampleSizeInBits();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment