summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-25 23:14:54 +0100
committerwm4 <wm4@nowhere>2013-11-25 23:14:54 +0100
commitb5b16925938fd37a604f5235afc7257f0b9bd6c7 (patch)
tree95b90e11cf5e42faa3c4336496bcf87e9c74ebed /video
parent8743d3fbfafe51a7aa3847663f6f6120438eb772 (diff)
downloadmpv-b5b16925938fd37a604f5235afc7257f0b9bd6c7.tar.bz2
mpv-b5b16925938fd37a604f5235afc7257f0b9bd6c7.tar.xz
video: disable PTS sorting fallback by default
It appears PTS sorting was useful only for avi files (and VfW-muxed mkv). Maybe it was historically also important for decoders with broken or non-existent PTS reordering (win32 codecs?). But now that we handle demuxers which outputs DTS only correctly, it just seems dead weight. Disable it by default. The --pts-association-mode option is now forced to always use the decoder's PTS value. You can still enable the old default (auto) or force sorting. But we will probably remove this option entirely at some point. Make demux_mkv export timestamps at DTS when it's in VfW mode. This is needed to get correct timestamps with the new default mode. demux_lavf already does that.
Diffstat (limited to 'video')
-rw-r--r--video/decode/dec_video.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c
index d2479a7610..d0d7355803 100644
--- a/video/decode/dec_video.c
+++ b/video/decode/dec_video.c
@@ -211,12 +211,13 @@ struct mp_image *video_decode(struct dec_video *d_video,
{
mp_image_t *mpi = NULL;
struct MPOpts *opts = d_video->opts;
+ bool sort_pts = opts->user_pts_assoc_mode != 1 && opts->correct_pts;
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) {
+ if (sort_pts && pts != MP_NOPTS_VALUE) {
int delay = -1;
video_vd_control(d_video, VDCTRL_QUERY_UNSEEN_FRAMES, &delay);
if (delay >= 0) {
@@ -270,7 +271,7 @@ struct mp_image *video_decode(struct dec_video *d_video,
|| pts == MP_NOPTS_VALUE)
d_video->num_reordered_pts_problems++;
prevpts = d_video->sorted_pts;
- if (opts->correct_pts) {
+ if (sort_pts) {
if (d_video->num_buffered_pts) {
d_video->num_buffered_pts--;
d_video->sorted_pts =