mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 03:52:22 +02:00
demux: fix seek ranges of images
When a video-reconfig occurs with an image, the cache is not used because find_cache_seek_range() checks if the start time was initialized, but for images it stays at MP_NOPTS_VALUE. This makes rotating large network images slow because they are re-downloaded on every rotation. Fix this by setting the timestamps of image cache ranges by altering a condition.
This commit is contained in:
parent
6179995dd7
commit
8d85627aad
@ -663,7 +663,7 @@ static void update_seek_ranges(struct demux_cached_range *range)
|
||||
}
|
||||
}
|
||||
|
||||
if (range->seek_start >= range->seek_end)
|
||||
if (range->seek_start >= range->seek_end && !(range->is_bof && range->is_eof))
|
||||
goto broken;
|
||||
|
||||
prune_metadata(range);
|
||||
|
Loading…
Reference in New Issue
Block a user