# HG changeset patch # User uau # Date 1165711838 0 # Node ID bf65ffcf0cdba5cc7a0c4c97a0583b75cac889e7 # Parent 0e6c0cd3dfac689fd849db48a6ed5b48099112b1 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. diff -r 0e6c0cd3dfac -r bf65ffcf0cdb libmpdemux/demux_lavf.c --- a/libmpdemux/demux_lavf.c Sun Dec 10 00:21:35 2006 +0000 +++ b/libmpdemux/demux_lavf.c Sun Dec 10 00:50:38 2006 +0000 @@ -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;