mpv/timeline
wm4 31017105e9 matroska: speed up ordered chapters scanning with improved heuristics
Try to be a bit more clever when scanning for linked mkv files (ordered
chapters feature). Instead of just preferring filenames with a closer
prefix match, consider file sizes as well. The assumption is that it is
better to scan small files first. Achieve this by sorting by prefix
first, and then by file size.

In order to make this new behavior trigger more often, be a more "fuzzy"
about the prefix matching: consider all matches in a certain range as
equal.

This will speed up the following case:
   title_01.mkv
   title_02.mkv
   title_03.mkv
   title_op.mkv (title0*.mkv link to it)
Playing title_01.mkv, the old code would first scan title_0*, and then
title_op.mkv, as "title_0" is the largest prefix. The new code would
reduce the common prefix to "title", and then sort the resulting files
by size, causing title_op.mkv to be scanned first. The total number of
scanned files is reduced.
2011-12-23 16:24:00 +01:00
..
tl_edl.c demuxer.h: avoid including stream.h 2011-08-19 21:37:16 +03:00
tl_matroska.c matroska: speed up ordered chapters scanning with improved heuristics 2011-12-23 16:24:00 +01:00