Skip to content

Commit 6b8b5a0

Browse files
James DongAndroid (Google) Code Review
authored andcommitted
Merge "DO NOT MERGE - Consider I-Frame at zeroeth position when searching for sync frames" into ics-mr1
2 parents 05d6306 + cb06491 commit 6b8b5a0

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)