diff options
author | wm4 <wm4@nowhere> | 2020-02-20 15:11:46 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-02-20 15:11:46 +0100 |
commit | 0020b47ffd543b615e73ed2972d0643d5b264b1d (patch) | |
tree | 29fd09746a7a9d7517d91bc6aecbc582998b48e8 /demux | |
parent | f321d8da991177ffaa8842ef4a05ea2714265f28 (diff) | |
download | mpv-0020b47ffd543b615e73ed2972d0643d5b264b1d.tar.bz2 mpv-0020b47ffd543b615e73ed2972d0643d5b264b1d.tar.xz |
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.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/demux/demux.c b/demux/demux.c index 75d74d0beb..cf54df5e96 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -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); |