[MPlayer-cvslog] r21564 - trunk/libmpdemux/demux_lavf.c

uau subversion at mplayerhq.hu
Sun Dec 10 01:50:39 CET 2006


Author: uau
Date: Sun Dec 10 01:50:38 2006
New Revision: 21564

Modified:
   trunk/libmpdemux/demux_lavf.c

Log:
Set AVFMT_FLAG_GENPTS if -correct-pts is used.
This should allow using -correct-pts (and thus filters which adjust pts
or add frames) with dvd or other mpeg container files by specifying
"-correct-pts -demuxer lavf -vc ffmpeg12". Might work with libmpeg2
decoder too but certainly not with internal demuxer.
Using this flag isn't quite optimal as it can cause extra buffering of
demuxed frames, but at least it's better than just failing until a more
complex solution is implemented.


Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c	(original)
+++ trunk/libmpdemux/demux_lavf.c	Sun Dec 10 01:50:38 2006
@@ -196,6 +196,10 @@
     register_protocol(&mp_protocol);
 
     avfc = av_alloc_format_context();
+
+    if (correct_pts)
+        avfc->flags |= AVFMT_FLAG_GENPTS;
+
     ap.prealloced_context = 1;
     if(opt_probesize) {
         double d = (double) opt_probesize;



More information about the MPlayer-cvslog mailing list