diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c index a926bbdb4c..c6604c2196 100644 --- a/ext/opus/gstopusenc.c +++ b/ext/opus/gstopusenc.c @@ -544,7 +544,7 @@ gst_opus_enc_setup (GstOpusEnc * enc) enc->state = opus_multistream_encoder_create (enc->sample_rate, enc->n_channels, - (enc->n_channels + 1) / 2, enc->n_channels / 2, trivial_mapping, + enc->n_channels, 0, trivial_mapping, enc->audio_or_voip ? OPUS_APPLICATION_AUDIO : OPUS_APPLICATION_VOIP, &error); if (!enc->state || error != OPUS_OK) diff --git a/ext/opus/gstopusheader.c b/ext/opus/gstopusheader.c index 1aa3b0d01b..42df7b35fb 100644 --- a/ext/opus/gstopusheader.c +++ b/ext/opus/gstopusheader.c @@ -44,8 +44,8 @@ gst_opus_enc_create_id_buffer (gint nchannels, gint sample_rate, gst_byte_writer_put_uint16_le (&bw, 0); /* output gain */ gst_byte_writer_put_uint8 (&bw, channel_mapping_family); if (channel_mapping_family > 0) { - gst_byte_writer_put_uint8 (&bw, (nchannels + 1) / 2); - gst_byte_writer_put_uint8 (&bw, nchannels / 2); + gst_byte_writer_put_uint8 (&bw, nchannels); + gst_byte_writer_put_uint8 (&bw, 0); gst_byte_writer_put_data (&bw, channel_mapping, nchannels); }