diff options
author | Yamit Mehta <ymehta@codeaurora.org> | 2015-07-20 14:06:53 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:24:16 -0600 |
commit | af0860c625c041dedb15db7247ff81c8e294bee4 (patch) | |
tree | e04cd9787ef3ea38566e9859e34da68670fdd688 /media | |
parent | d098f35fa9cd20969a1fbf08d585f13a27166bef (diff) | |
download | frameworks_av-af0860c625c041dedb15db7247ff81c8e294bee4.zip frameworks_av-af0860c625c041dedb15db7247ff81c8e294bee4.tar.gz frameworks_av-af0860c625c041dedb15db7247ff81c8e294bee4.tar.bz2 |
libstagefright - Fix seek on audio having empty stss block
Ignore stss block for audio even if its present, all audio
sample are sync samples itself, self decodeable and playable.
Parsing this block for audio restricts audio seek to few entries
available in this block, sometimes 0, which is undesired.
CRs-Fixed: 664870
Change-Id: If3208d5c0557d3eaeddf875d6c6762bd870c439b
Diffstat (limited to 'media')
-rwxr-xr-x | media/libstagefright/MPEG4Extractor.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp index e88e90f..4c6bc40 100755 --- a/media/libstagefright/MPEG4Extractor.cpp +++ b/media/libstagefright/MPEG4Extractor.cpp @@ -1555,14 +1555,22 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { *offset += chunk_size; - status_t err = - mLastTrack->sampleTable->setTimeToSampleParams( - data_offset, chunk_data_size); + // Ignore stss block for audio even if its present + // All audio sample are sync samples itself, + // self decodeable and playable. + // Parsing this block for audio restricts audio seek to few entries + // available in this block, sometimes 0, which is undesired. + const char *mime; + CHECK(mLastTrack->meta->findCString(kKeyMIMEType, &mime)); + if (strncasecmp("audio/", mime, 6)) { + status_t err = + mLastTrack->sampleTable->setSyncSampleParams( + data_offset, chunk_data_size); - if (err != OK) { - return err; + if (err != OK) { + return err; + } } - break; } |