From 0478f1a29f8302263f2196525510decf6c2daf19 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Mon, 15 Nov 2010 17:48:22 +0200 Subject: [PATCH] demux_mkv: fix minor seek problem Commit fc66c94360 ("demux_mkv: seek: with no track-specific index entries use any") used uint64_t for a variable that should have been int64_t. Fix. The practical effects of this error were minor; mainly it made the player unnecessarily read the file contents between the previous index entry and the correct one when seeking. --- libmpdemux/demux_mkv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index b0601b7da6..78bd6d30eb 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -2507,7 +2507,7 @@ static struct mkv_index *seek_with_cues(struct demuxer *demuxer, int seek_id, /* difference to the wanted timecode. */ for (int i = 0; i < mkv_d->num_indexes; i++) if (seek_id < 0 || mkv_d->indexes[i].tnum == seek_id) { - uint64_t diff = + int64_t diff = target_timecode - (int64_t) (mkv_d->indexes[i].timecode * mkv_d->tc_scale / 1000000.0 + 0.5); -- 2.11.4.GIT