mirror of https://github.com/mpv-player/mpv
demux_mkv: Round more seeks to "backwards" keyframes
Allow more fuzziness in treating timestamps as inaccurate attempts to seek "exactly" to a keyframe. A seek forward can now actually go to a keyframe 5 ms back from the timecode, and correspondingly for seeks backwards. Before only 1 ms was allowed. This helps with some files that have inaccurate chapter boundaries.
This commit is contained in:
parent
d9977e1c81
commit
3f75062ca6
|
@ -2958,7 +2958,7 @@ demux_mkv_seek (demuxer_t *demuxer, float rel_seek_secs, float audio_delay, int
|
|||
}
|
||||
// Adjust the target a little bit to catch cases where the target position
|
||||
// specifies a keyframe with high, but not perfect, precision.
|
||||
rel_seek_secs += flags & SEEK_FORWARD ? -0.001 : 0.001;
|
||||
rel_seek_secs += flags & SEEK_FORWARD ? -0.005 : 0.005;
|
||||
|
||||
free_cached_dps (demuxer);
|
||||
if (!(flags & SEEK_FACTOR)) /* time in secs */
|
||||
|
|
Loading…
Reference in New Issue