[MPlayer-cvslog] r19436 - trunk/libmpdemux/demux_mkv.c

eugeni subversion at mplayerhq.hu
Fri Aug 18 14:20:43 CEST 2006


Author: eugeni
Date: Fri Aug 18 14:20:43 2006
New Revision: 19436

Modified:
   trunk/libmpdemux/demux_mkv.c

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


Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c	(original)
+++ trunk/libmpdemux/demux_mkv.c	Fri Aug 18 14:20:43 2006
@@ -3606,7 +3606,7 @@
           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)



More information about the MPlayer-cvslog mailing list