summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MPEG4Extractor.cpp
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-08-31 17:19:52 -0700
committerLajos Molnar <lajos@google.com>2015-08-31 17:22:29 -0700
commitcf75af8f76265fb2909028f5dc68c7029dbe5f49 (patch)
treee63da0f16e4d09c3aa6873f73fa40eb3118fd11f /media/libstagefright/MPEG4Extractor.cpp
parent389e765394a950b9697bba49c1998f2029bd58b4 (diff)
downloadframeworks_av-cf75af8f76265fb2909028f5dc68c7029dbe5f49.zip
frameworks_av-cf75af8f76265fb2909028f5dc68c7029dbe5f49.tar.gz
frameworks_av-cf75af8f76265fb2909028f5dc68c7029dbe5f49.tar.bz2
stagefright: MPEG4Extractor: allow 'hdlr' box before first track
Bug: 21725583 Change-Id: I799c1967759c7e49fb50281a1708188450caac77
Diffstat (limited to 'media/libstagefright/MPEG4Extractor.cpp')
-rwxr-xr-xmedia/libstagefright/MPEG4Extractor.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index a76334f..38ae6f3 100755
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -1952,15 +1952,14 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
return ERROR_IO;
}
- if (mLastTrack == NULL)
- return ERROR_MALFORMED;
-
uint32_t type = ntohl(buffer);
// For the 3GPP file format, the handler-type within the 'hdlr' box
// shall be 'text'. We also want to support 'sbtl' handler type
// for a practical reason as various MPEG4 containers use it.
if (type == FOURCC('t', 'e', 'x', 't') || type == FOURCC('s', 'b', 't', 'l')) {
- mLastTrack->meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_TEXT_3GPP);
+ if (mLastTrack != NULL) {
+ mLastTrack->meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_TEXT_3GPP);
+ }
}
break;