[gst-cvs] gst-plugins-good: qtdemux: AAC codec_data can be > 2 bytes long

Tim Müller tpm at kemper.freedesktop.org
Tue Oct 5 11:49:41 PDT 2010


Module: gst-plugins-good
Branch: master
Commit: 4a244e0d552f01d17b04de2cfcfb270ecd848521
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=4a244e0d552f01d17b04de2cfcfb270ecd848521

Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date:   Tue Oct  5 19:40:50 2010 +0100

qtdemux: AAC codec_data can be > 2 bytes long

This fixes the assumption that DecoderSpecificInfo must be 2 bytes long
for AAC files. The specification allows HE-AAC to be explicitly
signalled in a backward compatible way. This is done by means of an
additional information after the regular AAC header. It is expected that
decoders that can play AAC but not HE-AAC will parse the header normally
and ignore extended bits, much as they do for the HE-AAC specific payload
in the actual stream.

https://bugzilla.gnome.org/show_bug.cgi?id=612313

---

 gst/qtdemux/qtdemux.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 673777c..1595db9 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -7421,7 +7421,10 @@ gst_qtdemux_handle_esds (GstQTDemux * qtdemux, QtDemuxStream * stream,
         rate = gst_codec_utils_aac_get_sample_rate_from_index (rateindex);
         if (rate > 0)
           stream->rate = rate;
+      }
 
+      /* Set level and profile if possible */
+      if (data_ptr != NULL && data_len >= 2) {
         gst_codec_utils_aac_caps_set_level_and_profile (stream->caps,
             data_ptr, data_len);
       }





More information about the Gstreamer-commits mailing list