diff options
author | wm4 <wm4@nowhere> | 2013-11-25 23:14:54 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-25 23:14:54 +0100 |
commit | b5b16925938fd37a604f5235afc7257f0b9bd6c7 (patch) | |
tree | 95b90e11cf5e42faa3c4336496bcf87e9c74ebed /demux | |
parent | 8743d3fbfafe51a7aa3847663f6f6120438eb772 (diff) | |
download | mpv-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 'demux')
-rw-r--r-- | demux/demux_mkv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index 2199a9c932..ec98bc81a9 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -2373,6 +2373,8 @@ static int handle_block(demuxer_t *demuxer, struct block_info *block_info) * values being the same) */ if (i == 0 || track->default_duration) dp->pts = mkv_d->last_pts + i * track->default_duration; + if (track->ms_compat) + MPSWAP(double, dp->pts, dp->dts); dp->duration = block_duration / 1e9; demuxer_add_packet(demuxer, stream, dp); } |