Fix fast-forward at end of episode (#6074)
When using variable speed, skipping back and forth introduces some uncertainty to the current position, causing skip-forward to try to skip to an invalid position when very near the end of the episode. This change fixes this by skipping the current episode if the desired skip-forward position exceeds the duration.
This commit is contained in:
parent
346365b8d0
commit
8a011badd3
|
@ -343,6 +343,12 @@ public class LocalPSMP extends PlaybackServiceMediaPlayer {
|
|||
t = 0;
|
||||
}
|
||||
|
||||
if (t >= getDuration()) {
|
||||
Log.d(TAG, "Seek reached end of file, skipping to next episode");
|
||||
skip();
|
||||
return;
|
||||
}
|
||||
|
||||
if (playerStatus == PlayerStatus.PLAYING
|
||||
|| playerStatus == PlayerStatus.PAUSED
|
||||
|| playerStatus == PlayerStatus.PREPARED) {
|
||||
|
|
Loading…
Reference in New Issue