mirror of
https://github.com/mpv-player/mpv
synced 2025-03-20 18:28:01 +00:00
demux: reject cache seeks if parts of the range are unset
In theory, start/ts_min could be set to NOPTS, in which case "pts < start" for a valid pts would always evaluate to false. Also remove the redundant "in-cache seek is possible.." message, as there's always another message when cache seeks are done.
This commit is contained in:
parent
03a0e8336a
commit
d235380cd3
@ -1670,10 +1670,11 @@ static bool try_seek_cache(struct demux_internal *in, double pts, int flags)
|
||||
|
||||
MP_VERBOSE(in, "in-cache seek range = %f <-> %f (%f)\n", start, end, pts);
|
||||
|
||||
if (pts < start || pts > end)
|
||||
if (start == MP_NOPTS_VALUE || end == MP_NOPTS_VALUE)
|
||||
return false;
|
||||
|
||||
MP_VERBOSE(in, "in-cache seek is possible..\n");
|
||||
if (pts < start || pts > end)
|
||||
return false;
|
||||
|
||||
clear_reader_state(in);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user