[MPlayer-dev-eng] [PATCH] 1 line mkv vfr playing fix

Sam Dennis sam at malfunction.screaming.net
Mon May 16 02:41:12 CEST 2005


This is a quick one line fix for playback of variable framerate
(explicit timecodes) matroska files.  This does not fix seeking
backwards unfortunately, as this is also broken at present.

Hopefully it is correct, but the poor state of documentation is
making that uncertain; demux_stream_t.pts should only relate to
playback if video_read_frame is using it correctly, which would
imply that this function has no business in assigning to it.

To see the current behaviour, use mkvmerge (any recent version)
to create a matroska file from an avi with both video and audio
streams using a timecode file such as this:

# timecode format v1
assume 1
0,99999,30

-- 
++acr@,ka"
-------------- next part --------------
Index: main/libmpdemux/demux_mkv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mkv.c,v
retrieving revision 1.42
diff -u -w -p -u -r1.42 demux_mkv.c
--- main/libmpdemux/demux_mkv.c	14 May 2005 06:52:25 -0000	1.42
+++ main/libmpdemux/demux_mkv.c	15 May 2005 23:49:05 -0000
@@ -2937,7 +2937,7 @@ handle_block (demuxer_t *demuxer, uint8_
 
   if (use_this_block)
     {
-      mkv_d->last_pts = ds->pts = current_pts;
+      mkv_d->last_pts = current_pts;
       mkv_d->last_filepos = demuxer->filepos;
 
       for (i=0; i < laces; i++)


More information about the MPlayer-dev-eng mailing list