History

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.

Guido Cella committed 2 years ago

Commit 8d856271 parent 61799951 file · +1 −1Browse files

Unified · Split

demux/demux.c+1−1
@@ -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 goto broken;667 goto broken;
668 668
669 prune_metadata(range);669 prune_metadata(range);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t