summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demuxer.h
diff options
context:
space:
mode:
authoruau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-06 06:58:17 +0000
committeruau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-06 06:58:17 +0000
commite2727ec797e19fb6d4d2d3338ce17dce976e0b28 (patch)
treed66f39217166121fab9751c1b271eb0734f68999 /libmpdemux/demuxer.h
parent11ade8f86d0d358e90737451983ed37075832e5e (diff)
downloadmpv-e2727ec797e19fb6d4d2d3338ce17dce976e0b28.tar.bz2
mpv-e2727ec797e19fb6d4d2d3338ce17dce976e0b28.tar.xz
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18922 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demuxer.h')
-rw-r--r--libmpdemux/demuxer.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h
index 00093d288e..93b43721c4 100644
--- a/libmpdemux/demuxer.h
+++ b/libmpdemux/demuxer.h
@@ -126,6 +126,8 @@ typedef struct demuxer_info_st {
struct demuxer_st;
+extern int correct_pts;
+
/**
* Demuxer description structure
*/
@@ -182,7 +184,9 @@ inline static demux_packet_t* new_demux_packet(int len){
demux_packet_t* dp=(demux_packet_t*)malloc(sizeof(demux_packet_t));
dp->len=len;
dp->next=NULL;
- dp->pts=0;
+ // still using 0 by default in case there is some code that uses 0 for both
+ // unknown and a valid pts value
+ dp->pts=correct_pts ? MP_NOPTS_VALUE : 0;
dp->pos=0;
dp->flags=0;
dp->refcount=1;