diff options
author | wm4 <wm4@nowhere> | 2019-06-08 20:32:15 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-09-19 20:37:05 +0200 |
commit | fae31f39c7c2a8d71b101680e4fa99400ea06a16 (patch) | |
tree | d609156782e0d7358ee15122dd1fbc62971c6c95 /demux/timeline.h | |
parent | e8147843fc072c5056d99b6c162216d82f1eedc7 (diff) | |
download | mpv-fae31f39c7c2a8d71b101680e4fa99400ea06a16.tar.bz2 mpv-fae31f39c7c2a8d71b101680e4fa99400ea06a16.tar.xz |
demux: refactor cache range init/deinit
Remove the duplicated creation of the first range. Explicitly destroy
ranges, including the last one on final deinit.
It looks like this also fixes a leak of removed range structs, which was
never noticed because they're so small, and were freed on final deinit
due to having the demuxer as talloc parent.
This improves upon the previous commit too (that change should have
been part of it I guess). Sub-demuxers (demux_timeline only) now
automatically don't use the cache (like it was intended by the previous
commit). The cache is "initialized" (or disabled) last in the recursive
call chain, which is messy, but this sub demuxer stuff FUCKING SUCKS, as
mentioned in the previous commit message. This would be no problem if
the caching layer and actual demuxer implementations were separate.
Most of this change has no purpose. Might make (de-)initialization of
further cache exerpiments simpler.
Diffstat (limited to 'demux/timeline.h')
0 files changed, 0 insertions, 0 deletions