stagefright: MP4Extractor: allow 10% overhead on default sample size am: a27317ab45 am: 268c480035 am: 87ce4202df am: d8c0785a36 am: fed97f38c2 am: 44f4c4d388 am: bdba8a6e12 am: de67feb70e am: 4723392015 am: c071a00dcf am: 7555e69a7e
am: 181e39beba
Change-Id: I74f7344d6ec0db0443d492b0c65e9f5e25dd203e
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index 3608bad..87abb6a 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -1677,6 +1677,9 @@
// ratio. Use compression ratio of 1.
max_size = width * height * 3 / 2;
}
+ // HACK: allow 10% overhead
+ // TODO: read sample size from traf atom for fragmented MPEG4.
+ max_size += max_size / 10;
mLastTrack->meta->setInt32(kKeyMaxInputSize, max_size);
}