Search backwards for keyframe when resuming playback #11713
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, when resuming playback of a video, a human can easily notice how the player will jump up to several seconds ahead of the resume point. The reason being that the player will seek to the closest keyframe after the position one wants to jump to.
This patch sets the backward flag so that the player jumps to the closest keyframe before the resume point. (See CDVDDemuxFFmpeg::SeekTime, FFmpeg flag AVSEEK_FLAG_BACKWARD)
Instead of skipping a few seconds after resuming, the last couple of seconds will be repeated and the user will not miss content.
Types of change
Checklist: