Commit c968ea6f authored by Felix Paul Kühne's avatar Felix Paul Kühne

playback: don't jump to previous position if it less than 1 min before EOF

parent e429646f
......@@ -517,7 +517,7 @@
if (duration != 0)
playbackPositionInTime = @(lastPosition * (duration / 1000.));
}
if (playbackPositionInTime.intValue > 0) {
if (playbackPositionInTime.intValue > 0 && (duration * lastPosition - duration) > 0) {
/* start time is not supported for media lists */
[_mediaPlayer.media addOptions:@{@"start-time": playbackPositionInTime}];
APLog(@"set starttime to %i", playbackPositionInTime.intValue);
......@@ -545,7 +545,7 @@
_mediaPlayer.videoAspectRatio = NULL;
/* some demuxers don't respect :start-time, so re-try here */
if (lastPosition < .95 && _mediaPlayer.position < lastPosition)
if (lastPosition < .95 && _mediaPlayer.position < lastPosition && (duration * lastPosition - duration) > 0)
_mediaPlayer.position = lastPosition;
[self _resetIdleTimer];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment