Bug 1205179: [mp4] Don't reject 7 bytes long avcC atom. r=gerald a=sledru
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 16 Sep 2015 16:33:20 +1000
changeset 277699 1e3f704a18b96e5f12c2aa998c40515a0d109fe4
parent 277698 82828c3a72c56c74270419911b61ddc57cbb7d70
child 277700 3c3a1d71886740ca6e1ecf3e0c241867d2863e8c
push id8441
push userjyavenard@mozilla.com
push dateFri, 18 Sep 2015 12:13:21 +0000
treeherdermozilla-aurora@1e3f704a18b9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald, sledru
bugs1205179
milestone42.0a2
Bug 1205179: [mp4] Don't reject 7 bytes long avcC atom. r=gerald a=sledru An AVC3 stream will typically use 7 bytes avcC (due to have 0 SPS/PPS)
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
--- a/media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
@@ -1667,17 +1667,17 @@ status_t MPEG4Extractor::parseChunk(off6
             }
 
             *offset += chunk_size;
             break;
         }
 
         case FOURCC('a', 'v', 'c', 'C'):
         {
-            if (chunk_data_size <= 7) {
+            if (chunk_data_size < 7) {
               ALOGE("short avcC chunk (%d bytes)", chunk_data_size);
               return ERROR_MALFORMED;
             }
 
             sp<ABuffer> buffer = new ABuffer(chunk_data_size);
 
             if (mDataSource->readAt(
                         data_offset, buffer->data(), chunk_data_size) < chunk_data_size) {