mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
avauddec: fix unnecessary reconfiguration if the audio layout isn't specified
It would constantly want to renegotiate (and spam the debug log) even though the channel layout hasn't actually changed. We use the same fallback in gst_ffmpegauddec_negotiate() already. This happens with WMA files for example. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3103>
This commit is contained in:
parent
f8d8d67b8b
commit
237b063843
1 changed files with 3 additions and 0 deletions
|
@ -358,6 +358,9 @@ settings_changed (GstFFMpegAudDec * ffmpegdec, AVFrame * frame)
|
||||||
GstAudioLayout layout;
|
GstAudioLayout layout;
|
||||||
gint channels = av_get_channel_layout_nb_channels (frame->channel_layout);
|
gint channels = av_get_channel_layout_nb_channels (frame->channel_layout);
|
||||||
|
|
||||||
|
if (channels == 0)
|
||||||
|
channels = frame->channels;
|
||||||
|
|
||||||
format = gst_ffmpeg_smpfmt_to_audioformat (frame->format, &layout);
|
format = gst_ffmpeg_smpfmt_to_audioformat (frame->format, &layout);
|
||||||
if (format == GST_AUDIO_FORMAT_UNKNOWN)
|
if (format == GST_AUDIO_FORMAT_UNKNOWN)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue