diff options
author | Hong Teng <hongteng@google.com> | 2011-12-15 16:56:49 -0800 |
---|---|---|
committer | Hong Teng <hongteng@google.com> | 2011-12-16 14:32:59 -0800 |
commit | 8d0dd8b46163ec7b42e2051c441ae2bf96dd9aec (patch) | |
tree | 5f1fd9dc97c8c21c1804a14c50a636b4b2ab01ba /media/libstagefright/SampleTable.cpp | |
parent | 079123ee3d2e20bbc17a7ddbd96ca46bed27898f (diff) | |
download | frameworks_av-8d0dd8b46163ec7b42e2051c441ae2bf96dd9aec.zip frameworks_av-8d0dd8b46163ec7b42e2051c441ae2bf96dd9aec.tar.gz frameworks_av-8d0dd8b46163ec7b42e2051c441ae2bf96dd9aec.tar.bz2 |
Fix for 5754998 testPerformanceTransitionWithEffectOverlapping test failed.
-Fix the index is out of sync frame array boundary when seeking to end of a 3gp file.
Validation only were done for video editor cts test and Movie Studio application.
Futher validation may include media player, youtube application,.etc.
Change-Id: Ib01314f1768cfab702dbe25c307553ace0b85e77
Diffstat (limited to 'media/libstagefright/SampleTable.cpp')
-rw-r--r-- | media/libstagefright/SampleTable.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/media/libstagefright/SampleTable.cpp b/media/libstagefright/SampleTable.cpp index 8e790fc..3e287fa 100644 --- a/media/libstagefright/SampleTable.cpp +++ b/media/libstagefright/SampleTable.cpp @@ -632,6 +632,13 @@ status_t SampleTable::findSyncSampleNear( break; } } + if (left == mNumSyncSamples) { + if (flags == kFlagAfter) { + LOGE("tried to find a sync frame after the last one: %d", left); + return ERROR_OUT_OF_RANGE; + } + left = left - 1; + } // Now ssi[left] is the sync sample index just before (or at) // start_sample_index. |