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:
Uoti Urpala 2009-07-09 18:23:35 +03:00
parent d9977e1c81
commit 3f75062ca6
1 changed files with 1 additions and 1 deletions

View File

@ -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 */