typefind: Ensure we have enough data when reading the sync marker in the AAC/LOAS...
authorSebastian Dröge <slomo@circular-chaos.org>
Fri, 24 May 2013 15:43:53 +0000 (17:43 +0200)
committerSebastian Dröge <slomo@circular-chaos.org>
Fri, 24 May 2013 15:43:53 +0000 (17:43 +0200)
gst/typefind/gsttypefindfunctions.c

index 212481a..8feb6d5 100644 (file)
@@ -967,7 +967,7 @@ aac_type_find_scan_loas_frames (GstTypeFind * tf, DataScanCtx * scan_ctx,
     /* add size of sync stream header */
     len += 3;
 
-    if (len == 0 || !data_scan_ctx_ensure_data (tf, &c, len)) {
+    if (len == 0 || !data_scan_ctx_ensure_data (tf, &c, len + 2)) {
       GST_DEBUG ("Wrong sync or next frame not within reach, len=%u", len);
       break;
     }