diff options
author | wm4 <wm4@nowhere> | 2019-06-02 21:45:21 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-09-19 20:37:05 +0200 |
commit | aa275b2f0ce452dee7f968d637566cf3ff4b674d (patch) | |
tree | 0b98543f71af60fae4df05712683053a7a580337 /version.sh | |
parent | c0014e2f930a545deb0bb2eb7b98f7c2d3cac2db (diff) | |
download | mpv-aa275b2f0ce452dee7f968d637566cf3ff4b674d.tar.bz2 mpv-aa275b2f0ce452dee7f968d637566cf3ff4b674d.tar.xz |
demux: simplify cache search and exit early
The search was slightly more complicated and slow than it had to be. It
didn't assume that the packet list was sorted, which is responsible for
much of this. (I think the search code was borrowed from demux_mkv.c,
which does not sort index entries.)
There was a half-hearted attempt to make it exit early, but it was
mostly ineffective.
Simplify the code based on the assumption that the list is sorted. This
will exit the search loop once the worst case candidate entry was
checked.
Diffstat (limited to 'version.sh')
0 files changed, 0 insertions, 0 deletions