avauddec: Read channels from the channels field

If there is no layout, just read the channel count from the
channels field.

https://bugzilla.gnome.org/show_bug.cgi?id=752186
This commit is contained in:
Olivier Crete 2015-07-25 02:54:20 -04:00 committed by Olivier Crête
parent 6bfe79d903
commit 3b6c656e25

View file

@ -380,6 +380,8 @@ gst_ffmpegauddec_negotiate (GstFFMpegAudDec * ffmpegdec,
goto no_caps;
channels =
av_get_channel_layout_nb_channels (av_frame_get_channel_layout (frame));
if (channels == 0)
channels = av_frame_get_channels (frame);
if (channels == 0)
goto no_caps;