diff options
author | James Dong <jdong@google.com> | 2011-12-05 12:41:06 -0800 |
---|---|---|
committer | James Dong <jdong@google.com> | 2011-12-05 14:29:18 -0800 |
commit | 223e70d6bde101349cba04b20ef243730cf84c07 (patch) | |
tree | 5d8f574d8faaea100cb3937e3cf8e0b0b8f7b427 | |
parent | a0f2bf56e30f580535229fa6a58e7d48b762727c (diff) | |
download | frameworks_av-223e70d6bde101349cba04b20ef243730cf84c07.zip frameworks_av-223e70d6bde101349cba04b20ef243730cf84c07.tar.gz frameworks_av-223e70d6bde101349cba04b20ef243730cf84c07.tar.bz2 |
DO NOT MERGE - Consider I-Frame at zeroeth position when searching for sync frames
The current logic does not check the I-frame at zeroeth position and therefore
for the files with only 1 I-Frame at zeroeth postion does not play.
Originally authored by Braganza Sam Robertsh <sam.braganza@samsung.com>
Do not merge to master branch since we made some improvement to SampleTable.cpp in the master branch.
Change-Id: I068184dec71986f14a586f769c2af1f52b4bcf94
related-to-bug: 5711942
-rw-r--r-- | media/libstagefright/SampleTable.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/media/libstagefright/SampleTable.cpp b/media/libstagefright/SampleTable.cpp index 69d1785..bf31947 100644 --- a/media/libstagefright/SampleTable.cpp +++ b/media/libstagefright/SampleTable.cpp @@ -627,6 +627,14 @@ status_t SampleTable::findSyncSampleNear( ++left; } + + if (left == mNumSyncSamples) { + if (flags == kFlagAfter) { + LOGE("tried to find a sync frame after the last one: %d", left); + return ERROR_OUT_OF_RANGE; + } + } + if (left > 0) { --left; } |