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

reimar subversion at mplayerhq.hu
Sun Nov 5 21:29:30 CET 2006


Author: reimar
Date: Sun Nov  5 21:29:29 2006
New Revision: 20728

Modified:
   trunk/libmpdemux/demux_mkv.c

Log:
Fix index-based seeking in audio-only files, fixes bug #621


Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c	(original)
+++ trunk/libmpdemux/demux_mkv.c	Sun Nov  5 21:29:29 2006
@@ -3725,11 +3725,12 @@
       else
         {
           mkv_index_t *index = NULL;
+          int seek_id = (demuxer->video->id < 0) ? demuxer->audio->id : demuxer->video->id;  
 
           /* let's find the entry in the indexes with the smallest */
           /* difference to the wanted timecode. */
           for (i=0; i < mkv_d->num_indexes; i++)
-            if (mkv_d->indexes[i].tnum == demuxer->video->id)
+            if (mkv_d->indexes[i].tnum == seek_id)
               {
                 diff = target_timecode + mkv_d->first_tc -
                        (int64_t) mkv_d->indexes[i].timecode * mkv_d->tc_scale / 1000000.0;



More information about the MPlayer-cvslog mailing list