mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
atdec: Use gst_audio_decoder_set_output_caps() directly
The code currently sets the same caps in two different ways, and neither of them correctly handle the channel mask. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6157>
This commit is contained in:
parent
bc8a3ca526
commit
277d6ddf22
1 changed files with 1 additions and 5 deletions
|
@ -326,11 +326,7 @@ gst_atdec_set_format (GstAudioDecoder * decoder, GstCaps * caps)
|
|||
|
||||
/* set the format we want to negotiate downstream */
|
||||
gst_audio_info_from_caps (&output_info, output_caps);
|
||||
gst_audio_info_set_format (&output_info,
|
||||
output_format.mFormatFlags & kLinearPCMFormatFlagIsSignedInteger ?
|
||||
GST_AUDIO_FORMAT_S16LE : GST_AUDIO_FORMAT_F32LE,
|
||||
output_format.mSampleRate, output_format.mChannelsPerFrame, NULL);
|
||||
gst_audio_decoder_set_output_format (decoder, &output_info);
|
||||
gst_audio_decoder_set_output_caps (decoder, output_caps);
|
||||
gst_caps_unref (output_caps);
|
||||
|
||||
status = AudioQueueNewOutput (&input_format, gst_atdec_buffer_emptied,
|
||||
|
|
Loading…
Reference in a new issue