summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_mkv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmpdemux/demux_mkv.c')
-rw-r--r--libmpdemux/demux_mkv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c
index 1519995cec..7b402152f0 100644
--- a/libmpdemux/demux_mkv.c
+++ b/libmpdemux/demux_mkv.c
@@ -3660,7 +3660,8 @@ demux_mkv_seek (demuxer_t *demuxer, float rel_seek_secs, float audio_delay, int
for (i=0; i < mkv_d->num_indexes; i++)
if (mkv_d->indexes[i].tnum == demuxer->video->id)
{
- diff = target_timecode + mkv_d->first_tc - (int64_t) mkv_d->indexes[i].timecode;
+ diff = target_timecode + mkv_d->first_tc -
+ (int64_t) mkv_d->indexes[i].timecode * mkv_d->tc_scale / 1000000.0;
if ((flags & 1 || target_timecode <= mkv_d->last_pts*1000)
&& diff >= 0 && diff < min_diff)