diff options
author | Ramjee Singh <ramjee@codeaurora.org> | 2015-07-31 18:52:56 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:24:26 -0600 |
commit | 1d29adc492f393919f81f431f2ee8eedba91561b (patch) | |
tree | 332cb523f6cd1471733b88b7c26250436ed7ec18 /media/libstagefright | |
parent | c26afd6682bbd1adb6797e74ed8a68a4e624d138 (diff) | |
download | frameworks_av-1d29adc492f393919f81f431f2ee8eedba91561b.zip frameworks_av-1d29adc492f393919f81f431f2ee8eedba91561b.tar.gz frameworks_av-1d29adc492f393919f81f431f2ee8eedba91561b.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: I7f8e140aa27e8107a438f6bf4c21a3148c80680f
Diffstat (limited to 'media/libstagefright')
-rwxr-xr-x | media/libstagefright/MPEG4Extractor.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp index 4c6bc40..84e07b5 100755 --- a/media/libstagefright/MPEG4Extractor.cpp +++ b/media/libstagefright/MPEG4Extractor.cpp @@ -1555,22 +1555,14 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { *offset += chunk_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); + status_t err = + mLastTrack->sampleTable->setTimeToSampleParams( + data_offset, chunk_data_size); - if (err != OK) { - return err; - } + if (err != OK) { + return err; } + break; } @@ -1598,13 +1590,21 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { return ERROR_MALFORMED; *offset += chunk_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); - status_t err = - mLastTrack->sampleTable->setSyncSampleParams( - data_offset, chunk_data_size); - - if (err != OK) { - return err; + if (err != OK) { + return err; + } } break; |