summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-12-05 12:41:06 -0800
committerJames Dong <jdong@google.com>2011-12-05 14:29:18 -0800
commitcb064917cf070aaac48a3a04e0179638801e6565 (patch)
tree994ebd9aa8991ce94f23f5c537abccee6b290358 /media
parentf2e1249846a17c69d728189a8dc67f37261f0a59 (diff)
downloadframeworks_base-cb064917cf070aaac48a3a04e0179638801e6565.zip
frameworks_base-cb064917cf070aaac48a3a04e0179638801e6565.tar.gz
frameworks_base-cb064917cf070aaac48a3a04e0179638801e6565.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
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/SampleTable.cpp8
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;
}