summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-04-03 23:09:09 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-04-03 23:09:09 +0000
commit8236194904ccd415096c655999575c147b58fc27 (patch)
tree1095ec087e2ad4ba9d1f1f387a1cd7322089dbb8
parentaee4f4436f499b702d3e4dd8778dc1cf6ed6d222 (diff)
parent687d14d2fe23b87c584b41b01f24e3f2596baf18 (diff)
downloadframeworks_av-8236194904ccd415096c655999575c147b58fc27.tar.gz
frameworks_av-8236194904ccd415096c655999575c147b58fc27.tar.bz2
frameworks_av-8236194904ccd415096c655999575c147b58fc27.zip
Snap for 6362707 from 687d14d2fe23b87c584b41b01f24e3f2596baf18 to qt-qpr3-release
Change-Id: I8b0ec1b37f2dcd77469304694806ffec81190980
-rwxr-xr-xmedia/extractors/mp4/MPEG4Extractor.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/media/extractors/mp4/MPEG4Extractor.cpp b/media/extractors/mp4/MPEG4Extractor.cpp
index fa562f3026..485c0cc9ef 100755
--- a/media/extractors/mp4/MPEG4Extractor.cpp
+++ b/media/extractors/mp4/MPEG4Extractor.cpp
@@ -1060,6 +1060,8 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
// drop it now to reduce our footprint
free(mLastTrack->mTx3gBuffer);
mLastTrack->mTx3gBuffer = NULL;
+ mLastTrack->mTx3gFilled = 0;
+ mLastTrack->mTx3gSize = 0;
}
} else if (chunk_type == FOURCC("moov")) {
@@ -2621,6 +2623,10 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
// if those apps are compensating for it, we'd break them with such a change
//
+ if (mLastTrack->mTx3gBuffer == NULL) {
+ mLastTrack->mTx3gSize = 0;
+ mLastTrack->mTx3gFilled = 0;
+ }
if (mLastTrack->mTx3gSize - mLastTrack->mTx3gFilled < chunk_size) {
size_t growth = kTx3gGrowth;
if (growth < chunk_size) {