summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-12-10 00:50:38 +0000
committeruau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-12-10 00:50:38 +0000
commit2cfcfc4f22128a4c46dd15f0e22db69a7f5ffca5 (patch)
tree4ca1c33297a76172669931f2093c71e60be3de2a
parent2a2d39f0ed26e8572a470d3055bc0abda54949b1 (diff)
downloadmpv-2cfcfc4f22128a4c46dd15f0e22db69a7f5ffca5.tar.bz2
mpv-2cfcfc4f22128a4c46dd15f0e22db69a7f5ffca5.tar.xz
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21564 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libmpdemux/demux_lavf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c
index 8ad8ad076f..a7e8012159 100644
--- a/libmpdemux/demux_lavf.c
+++ b/libmpdemux/demux_lavf.c
@@ -196,6 +196,10 @@ static demuxer_t* demux_open_lavf(demuxer_t *demuxer){
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;