summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MPEG4Extractor.cpp
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2015-10-22 11:05:03 -0700
committerSteve Kondik <steve@cyngn.com>2015-11-05 21:16:18 -0800
commitd30f25cb92942cfe58708666235dbdedfc604070 (patch)
tree0380f72bfe29abca9870bf0985a29f2cdd5d3e45 /media/libstagefright/MPEG4Extractor.cpp
parent732e31f2afcc673983f8506aaddaafe8db7d9ecf (diff)
downloadframeworks_av-d30f25cb92942cfe58708666235dbdedfc604070.zip
frameworks_av-d30f25cb92942cfe58708666235dbdedfc604070.tar.gz
frameworks_av-d30f25cb92942cfe58708666235dbdedfc604070.tar.bz2
Fix offset adjustment when skipping off-spec meta chunk
Bug: 25172843 Change-Id: Ibbfe4369176f2a367eab5a39fd742f425b017288
Diffstat (limited to 'media/libstagefright/MPEG4Extractor.cpp')
-rwxr-xr-xmedia/libstagefright/MPEG4Extractor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index eee13c7..1f010d4 100755
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -1795,13 +1795,13 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
if (!isParsingMetaKeys) {
uint8_t buffer[4];
if (chunk_data_size < (off64_t)sizeof(buffer)) {
- *offset += chunk_size;
+ *offset = stop_offset;
return ERROR_MALFORMED;
}
if (mDataSource->readAt(
data_offset, buffer, 4) < 4) {
- *offset += chunk_size;
+ *offset = stop_offset;
return ERROR_IO;
}
@@ -1812,7 +1812,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
// apparently malformed chunks that don't have flags
// and completely different semantics than what's
// in the MPEG4 specs and skip it.
- *offset += chunk_size;
+ *offset = stop_offset;
return OK;
}
*offset += sizeof(buffer);