demux: fall back to DTS when determining seek target

Fixes AVI in particular, which abuses DTS for reordered PTS. (It's not
really DTS...)
This commit is contained in:
wm4 2017-10-25 16:13:07 +02:00
parent e6348504b3
commit 03a0e8336a
1 changed files with 1 additions and 1 deletions

View File

@ -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);