mirror of
https://github.com/mpv-player/mpv
synced 2025-01-18 21:31:13 +00:00
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.
This commit is contained in:
parent
fe3c4810e1
commit
0478f1a29f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user