diff options
author | wm4 <wm4@nowhere> | 2017-10-25 16:13:07 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-10-25 16:39:33 +0200 |
commit | 03a0e8336a89e686f4274121bc86987398e8c71c (patch) | |
tree | 25cd6a353296ba083832f191d8a5212f2194a231 | |
parent | e6348504b3a0bb97383edbd1fefd7decfb0c24c4 (diff) | |
download | mpv-03a0e8336a89e686f4274121bc86987398e8c71c.tar.bz2 mpv-03a0e8336a89e686f4274121bc86987398e8c71c.tar.xz |
demux: fall back to DTS when determining seek target
Fixes AVI in particular, which abuses DTS for reordered PTS. (It's not
really DTS...)
-rw-r--r-- | demux/demux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux.c b/demux/demux.c index bf0b53f939..492f704876 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -571,7 +571,7 @@ static double recompute_keyframe_target_pts(struct demux_packet *dp) in_keyframe_range = true; } if (in_keyframe_range) { - double ts = dp->pts; + double ts = PTS_OR_DEF(dp->pts, dp->dts); if (dp->segmented && (ts < dp->start || ts > dp->end)) ts = MP_NOPTS_VALUE; res = MP_PTS_MIN(res, ts); |