diff options
author | Guido Cella <guido@guidocella.xyz> | 2024-04-01 18:22:16 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2024-04-03 14:47:07 +0200 |
commit | 8d85627aad4a8e98db19aec7e4e28ca61b1bbe25 (patch) | |
tree | f79b4e11b04cc70e1f6cd90e7a6d29e7078fd1b1 /demux | |
parent | 6179995dd7ef576073e184abd01fd34890e1b59f (diff) | |
download | mpv-8d85627aad4a8e98db19aec7e4e28ca61b1bbe25.tar.bz2 mpv-8d85627aad4a8e98db19aec7e4e28ca61b1bbe25.tar.xz |
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.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux.c b/demux/demux.c index 386b088148..9aa63bc18c 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -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); |