summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-06-08 20:32:15 +0200
committerwm4 <wm4@nowhere>2019-09-19 20:37:05 +0200
commitfae31f39c7c2a8d71b101680e4fa99400ea06a16 (patch)
treed609156782e0d7358ee15122dd1fbc62971c6c95 /demux/demux.h
parente8147843fc072c5056d99b6c162216d82f1eedc7 (diff)
downloadmpv-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/demux.h')
-rw-r--r--demux/demux.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/demux/demux.h b/demux/demux.h
index 63897c342d..4cbb33b588 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -291,7 +291,6 @@ void demux_close_stream(struct demuxer *demuxer);
void demux_metadata_changed(demuxer_t *demuxer);
void demux_update(demuxer_t *demuxer);
-void demux_disable_cache(demuxer_t *demuxer);
bool demux_is_network_cached(demuxer_t *demuxer);
void demux_report_unbuffered_read_bytes(struct demuxer *demuxer, int64_t new);