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.
Unified · Split
| @@ -663,7 +663,7 @@ static void update_seek_ranges(struct demux_cached_range *range) · 662 unmodified lines | ||
| 663 | 663 | } |
| 664 | 664 | } |
| 665 | 665 | |
| 666 | − if (range->seek_start >= range->seek_end) | |
| 666 | + if (range->seek_start >= range->seek_end && !(range->is_bof && range->is_eof)) | |
| 667 | 667 | goto broken; |
| 668 | 668 | |
| 669 | 669 | prune_metadata(range); |