diff options
author | wm4 <wm4@nowhere> | 2013-11-25 23:12:18 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-25 23:12:18 +0100 |
commit | d8b59aa17fda6aff7bf3031abbd716adc1268422 (patch) | |
tree | 6e8c87b03ebcd32cb7cd1c95736cb2bc37515d2f /video | |
parent | 88fa420b200bef230c446c65d4cc1a038c4eaf2d (diff) | |
download | mpv-d8b59aa17fda6aff7bf3031abbd716adc1268422.tar.bz2 mpv-d8b59aa17fda6aff7bf3031abbd716adc1268422.tar.xz |
player: merge no-correct-pts with correct-pts code
Now the --no-correct-pts mode is like the normal mode, just with
different timestamp calculations. The semantics should be about the
same as before this commit.
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/dec_video.c | 3 | ||||
-rw-r--r-- | video/decode/dec_video.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c index be2ac8aabe..d2479a7610 100644 --- a/video/decode/dec_video.c +++ b/video/decode/dec_video.c @@ -213,6 +213,9 @@ struct mp_image *video_decode(struct dec_video *d_video, struct MPOpts *opts = d_video->opts; double pts = packet ? packet->pts : MP_NOPTS_VALUE; + if (pts != MP_NOPTS_VALUE) + d_video->last_packet_pts = pts; + if (opts->correct_pts && pts != MP_NOPTS_VALUE) { int delay = -1; video_vd_control(d_video, VDCTRL_QUERY_UNSEEN_FRAMES, &delay); diff --git a/video/decode/dec_video.h b/video/decode/dec_video.h index 3856d12043..827dcb6237 100644 --- a/video/decode/dec_video.h +++ b/video/decode/dec_video.h @@ -58,6 +58,7 @@ struct dec_video { float fps; // FPS from demuxer or from user override float initial_decoder_aspect; + double last_packet_pts; // State used only by player/video.c double last_pts; }; |