Fix seeking in Matroska files with non-default TimecodeScale value.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19817 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
eugeni 2006-09-12 21:45:06 +00:00
parent ee0ac67094
commit fa6bc3aa4f
1 changed files with 2 additions and 1 deletions

View File

@ -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)