Loading media/extractors/mp4/MPEG4Extractor.cpp +27 −11 Original line number Diff line number Diff line Loading @@ -1123,12 +1123,25 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { case FOURCC('t', 'r', 'e', 'f'): { *offset += chunk_size; if (mLastTrack == NULL) { off64_t stop_offset = *offset + chunk_size; *offset = data_offset; while (*offset < stop_offset) { status_t err = parseChunk(offset, depth + 1); if (err != OK) { return err; } } if (*offset != stop_offset) { return ERROR_MALFORMED; } break; } case FOURCC('t', 'h', 'm', 'b'): { *offset += chunk_size; if (mLastTrack != NULL) { // Skip thumbnail track for now since we don't have an // API to retrieve it yet. // The thumbnail track can't be accessed by negative index or time, Loading @@ -1136,6 +1149,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { // in the thumbnail track. We'll need a dedicated API to retrieve // thumbnail at time instead. mLastTrack->skipTrack = true; } break; } Loading Loading @@ -2353,9 +2367,11 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { // This means that the file should have moov box. // It could be any iso files (mp4, heifs, etc.) mHasMoovBox = true; if (mIsHeif) { ALOGV("identified HEIF image with other tracks"); } } } *offset = stop_offset; Loading Loading
media/extractors/mp4/MPEG4Extractor.cpp +27 −11 Original line number Diff line number Diff line Loading @@ -1123,12 +1123,25 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { case FOURCC('t', 'r', 'e', 'f'): { *offset += chunk_size; if (mLastTrack == NULL) { off64_t stop_offset = *offset + chunk_size; *offset = data_offset; while (*offset < stop_offset) { status_t err = parseChunk(offset, depth + 1); if (err != OK) { return err; } } if (*offset != stop_offset) { return ERROR_MALFORMED; } break; } case FOURCC('t', 'h', 'm', 'b'): { *offset += chunk_size; if (mLastTrack != NULL) { // Skip thumbnail track for now since we don't have an // API to retrieve it yet. // The thumbnail track can't be accessed by negative index or time, Loading @@ -1136,6 +1149,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { // in the thumbnail track. We'll need a dedicated API to retrieve // thumbnail at time instead. mLastTrack->skipTrack = true; } break; } Loading Loading @@ -2353,9 +2367,11 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { // This means that the file should have moov box. // It could be any iso files (mp4, heifs, etc.) mHasMoovBox = true; if (mIsHeif) { ALOGV("identified HEIF image with other tracks"); } } } *offset = stop_offset; Loading