Merge pull request #2183 from WeiChungChang/proposal-fix

Fix the issue when the sequence of PTS is out of order by bidirectional prediction for skipToKeyframeBefore()
This commit is contained in:
ojw28 2016-12-14 18:06:52 +00:00 committed by GitHub
commit fefef0f941

View File

@ -786,9 +786,7 @@ public final class DefaultTrackOutput implements TrackOutput {
return C.POSITION_UNSET;
}
int lastWriteIndex = (relativeWriteIndex == 0 ? capacity : relativeWriteIndex) - 1;
long lastTimeUs = timesUs[lastWriteIndex];
if (timeUs > lastTimeUs) {
if (timeUs > largestQueuedTimestampUs) {
return C.POSITION_UNSET;
}