aacparse: relax the detection of ADTS
authorAkihiro Tsukada <atsukada@users.sourceforge.net>
Tue, 26 Feb 2013 16:45:52 +0000 (01:45 +0900)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Mon, 13 Jan 2014 09:08:50 +0000 (09:08 +0000)
According to ISO/IEC 13818-7, "channel_config" field in ADTS header
may have value of 0, as in the case of frame with PCE.
gst_aac_parse_detect_streams() returned FALSE for those frames
and discarded them.

gst/audioparsers/gstaacparse.c

index 82bdc50..a465ea7 100644 (file)
@@ -806,7 +806,7 @@ gst_aac_parse_detect_stream (GstAacParse * aacparse,
     gst_aac_parse_parse_adts_header (aacparse, data, &rate, &channels,
         &aacparse->object_type, &aacparse->mpegversion);
 
-    if (!channels || !framesize) {
+    if (!framesize) {
       GST_DEBUG_OBJECT (aacparse, "impossible ADTS configuration");
       return FALSE;
     }