aacparse: fix LOAS parsing issue
authorNicolas Huet <nicolas.huet@parrot.com>
Wed, 4 Mar 2015 09:27:17 +0000 (10:27 +0100)
committerThiago Santos <thiagoss@osg.samsung.com>
Fri, 6 Mar 2015 17:34:08 +0000 (14:34 -0300)
Fix missing index in syncword searching

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

gst/audioparsers/gstaacparse.c

index 415e665..04cefe2 100644 (file)
@@ -809,7 +809,7 @@ gst_aac_parse_detect_stream (GstAacParse * aacparse,
 
   for (i = 0; i < avail - 4; i++) {
     if (((data[i] == 0xff) && ((data[i + 1] & 0xf6) == 0xf0)) ||
-        ((data[0] == 0x56) && ((data[1] & 0xe0) == 0xe0)) ||
+        ((data[i] == 0x56) && ((data[i + 1] & 0xe0) == 0xe0)) ||
         strncmp ((char *) data + i, "ADIF", 4) == 0) {
       GST_DEBUG_OBJECT (aacparse, "Found signature at offset %u", i);
       found = TRUE;