diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-15 17:48:22 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-15 17:54:09 +0200 |
commit | 0478f1a29f8302263f2196525510decf6c2daf19 (patch) | |
tree | dc3fb8d2ffb239c03a345123f622a19e509aca7c | |
parent | fe3c4810e1c8b535caf07df8e4434e322d3e6fc0 (diff) | |
download | mpv-0478f1a29f8302263f2196525510decf6c2daf19.tar.bz2 mpv-0478f1a29f8302263f2196525510decf6c2daf19.tar.xz |
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.
-rw-r--r-- | libmpdemux/demux_mkv.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |