Bug 1205179: [mp4] Don't reject 7 bytes long avcC atom. r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 16 Sep 2015 16:33:20 +1000
changeset 295363 95bac0001e70425acb2e55fd981e458b819856fd
parent 295362 cc917807f8ae5dba27ea0e3aa6b5e482529273a0
child 295364 f382a2b702e0187e684d68306a2dedce049385b3
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1205179
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1205179: [mp4] Don't reject 7 bytes long avcC atom. r=gerald 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
@@ -1727,17 +1727,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) {