mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
opusenc: only use mono streams for > 2 channels
I'm getting odd results with packing streams into stereo streams, and using only mono streams is enough in all cases.
This commit is contained in:
parent
65079e3ada
commit
631f42eee8
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue