From 3f75062ca65cea46fa9e06ab5f5271ad310440fd Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Thu, 9 Jul 2009 18:23:35 +0300 Subject: 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. --- libmpdemux/demux_mkv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libmpdemux/demux_mkv.c') diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index e4b3540913..4859bc4f53 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -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 */ -- cgit v1.2.3