diff options
author | wm4 <wm4@nowhere> | 2018-08-31 12:48:36 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2018-08-31 12:55:22 +0200 |
commit | 559a400ac36e75a8d73ba263fd7fa6736df1c2da (patch) | |
tree | 5e117d0ddfd279cae346fc334d4c3f9262509fef /player/playloop.c | |
parent | 5f83b6a5f5939ce39af929f200b1ea236fbe350c (diff) | |
download | mpv-559a400ac36e75a8d73ba263fd7fa6736df1c2da.tar.bz2 mpv-559a400ac36e75a8d73ba263fd7fa6736df1c2da.tar.xz |
demux, stream: rip out the classic stream cache
The demuxer cache is the only cache now. Might need another change to
combat seeking failures in mp4 etc. The only bad thing is the loss of
cache-speed, which was sort of nice to have.
Diffstat (limited to 'player/playloop.c')
-rw-r--r-- | player/playloop.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/player/playloop.c b/player/playloop.c index fa1cc544cb..59e3211df9 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -627,14 +627,11 @@ static void handle_pause_on_low_cache(struct MPContext *mpctx) double now = mp_time_sec(); - struct stream_cache_info c = {.idle = true}; - demux_stream_control(mpctx->demuxer, STREAM_CTRL_GET_CACHE_INFO, &c); - struct demux_ctrl_reader_state s = {.idle = true, .ts_duration = -1}; demux_control(mpctx->demuxer, DEMUXER_CTRL_GET_READER_STATE, &s); int cache_buffer = 100; - bool use_pause_on_low_cache = (c.size > 0 || mpctx->demuxer->is_network) && + bool use_pause_on_low_cache = demux_is_network_cached(mpctx->demuxer) && opts->cache_pause; if (!mpctx->restart_complete) { @@ -669,7 +666,7 @@ static void handle_pause_on_low_cache(struct MPContext *mpctx) } // Also update cache properties. - bool busy = !s.idle || !c.idle; + bool busy = !s.idle; if (busy || mpctx->next_cache_update > 0) { if (mpctx->next_cache_update <= now) { mpctx->next_cache_update = busy ? now + 0.25 : 0; |