mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-29 15:11:09 +08:00
demux: fix seek range caching with delay_open hack
These have ->segmented set (so the codec can be initialized properly), but have no segment start or end times. This code was (probably) the only thing which didn't handle this case.
This commit is contained in:
+2
-1
@@ -1844,7 +1844,8 @@ static struct demux_packet *compute_keyframe_times(struct demux_packet *pkt,
|
||||
break;
|
||||
|
||||
double ts = MP_PTS_OR_DEF(pkt->pts, pkt->dts);
|
||||
if (pkt->segmented && (ts < pkt->start || ts > pkt->end))
|
||||
if (pkt->segmented && ((pkt->start != MP_NOPTS_VALUE && ts < pkt->start) ||
|
||||
(pkt->end != MP_NOPTS_VALUE && ts > pkt->end)))
|
||||
ts = MP_NOPTS_VALUE;
|
||||
|
||||
min = MP_PTS_MIN(min, ts);
|
||||
|
||||
Reference in New Issue
Block a user