Skip to content

Commit cb06491

Browse files
author
James Dong
committed
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
1 parent f2e1249 commit cb06491

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

media/libstagefright/SampleTable.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,14 @@ status_t SampleTable::findSyncSampleNear(
627627

628628
++left;
629629
}
630+
631+
if (left == mNumSyncSamples) {
632+
if (flags == kFlagAfter) {
633+
LOGE("tried to find a sync frame after the last one: %d", left);
634+
return ERROR_OUT_OF_RANGE;
635+
}
636+
}
637+
630638
if (left > 0) {
631639
--left;
632640
}

0 commit comments

Comments
 (0)