diff libmpdemux/demux_mkv.c @ 18917:d9a75b26da6c

Add a new video pts tracking mode, enabled by option -correct-pts. This mode has the following differences: - Video timing is correct for streams with B frames, at least with some demuxers. - Video filters can modify frame timestamps and insert new frames, and removing frames is handled better than before. - Some things are known to break, it's not usable as the default yet. Things should work as before when the -correct-pts option is not used.
author uau
date Thu, 06 Jul 2006 06:58:17 +0000
parents 5c8acc972551
children a3788ff5d0b6
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Thu Jul 06 05:05:00 2006 +0000
+++ b/libmpdemux/demux_mkv.c	Thu Jul 06 06:58:17 2006 +0000
@@ -1690,12 +1690,12 @@
       else if (!strcmp(track->codec_id, MKV_V_MPEG1))
         {
           bih->biCompression = mmioFOURCC('m', 'p', 'g', '1');
-          track->reorder_timecodes = 1;
+          track->reorder_timecodes = !correct_pts;
         }
       else if (!strcmp(track->codec_id, MKV_V_MPEG2))
         {
           bih->biCompression = mmioFOURCC('m', 'p', 'g', '2');
-          track->reorder_timecodes = 1;
+          track->reorder_timecodes = !correct_pts;
         }
       else if (!strcmp(track->codec_id, MKV_V_MPEG4_AVC))
         {
@@ -1706,7 +1706,7 @@
               bih = (BITMAPINFOHEADER *) realloc (bih, bih->biSize);
               memcpy (bih + 1, track->private_data, track->private_size);
             }
-          track->reorder_timecodes = 1;
+          track->reorder_timecodes = !correct_pts;
         }
       else
         {