mirror of
https://github.com/androidx/media.git
synced 2025-05-07 15:40:37 +08:00
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:
commit
fefef0f941
@ -786,9 +786,7 @@ public final class DefaultTrackOutput implements TrackOutput {
|
|||||||
return C.POSITION_UNSET;
|
return C.POSITION_UNSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
int lastWriteIndex = (relativeWriteIndex == 0 ? capacity : relativeWriteIndex) - 1;
|
if (timeUs > largestQueuedTimestampUs) {
|
||||||
long lastTimeUs = timesUs[lastWriteIndex];
|
|
||||||
if (timeUs > lastTimeUs) {
|
|
||||||
return C.POSITION_UNSET;
|
return C.POSITION_UNSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user