From 64753bdbe879fe4ddc3e7b2c183fcd94d01b0515 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 30 Sep 2010 12:44:52 +0100 Subject: [PATCH] qtdemux: fix aac channel override based on codec data for 7.1 case --- gst/qtdemux/qtdemux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index ffd5e60..bd2e089 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -7499,9 +7499,12 @@ gst_qtdemux_handle_esds (GstQTDemux * qtdemux, QtDemuxStream * stream, if (data_ptr && data_len == 2) { guint channels, rateindex, rate; + /* FIXME: add gst_codec_utils_aac_get_{channels|sample_rate}()? */ channels = (data_ptr[1] & 0x7f) >> 3; - if (channels <= 7) { + if (channels > 0 && channels < 7) { stream->n_channels = channels; + } else if (channels == 7) { + stream->n_channels = 8; } rateindex = ((data_ptr[0] & 0x7) << 1) | ((data_ptr[1] & 0x80) >> 7); -- 2.7.4