1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-19 05:15:12 +00:00

Fix seeking in matroska files when timecodes do not start from zero.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19436 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
eugeni 2006-08-18 12:20:43 +00:00
parent 9d2c260488
commit bdb9b1d5dc

View File

@ -3606,7 +3606,7 @@ 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 - (int64_t) mkv_d->indexes[i].timecode;
diff = target_timecode + mkv_d->first_tc - (int64_t) mkv_d->indexes[i].timecode;
if ((flags & 1 || target_timecode <= mkv_d->last_pts*1000)
&& diff >= 0 && diff < min_diff)