mirror of
https://github.com/mpv-player/mpv
synced 2025-04-11 04:01:31 +00: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:
parent
f321d8da99
commit
0020b47ffd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user