From 5c7ecad93a771d71a773cace996afd706bbef3d2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 7 Sep 2018 22:26:48 +0200 Subject: demux: simplify API for returning cache status Instead of going through those weird DEMUXER_CTRLs, query this information directly. I'm not sure which kind of brain damage made me use CTRLs for these. Since there are no other DEMUXER_CTRLs that make sense for the frontend, remove the remaining infrastructure for them too. --- player/playloop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player/playloop.c') diff --git a/player/playloop.c b/player/playloop.c index 0326e32779..22a9331055 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -625,8 +625,8 @@ static void handle_pause_on_low_cache(struct MPContext *mpctx) double now = mp_time_sec(); - struct demux_ctrl_reader_state s = {.idle = true, .ts_duration = -1}; - demux_control(mpctx->demuxer, DEMUXER_CTRL_GET_READER_STATE, &s); + struct demux_reader_state s; + demux_get_reader_state(mpctx->demuxer, &s); int cache_buffer = 100; bool use_pause_on_low_cache = demux_is_network_cached(mpctx->demuxer) && -- cgit v1.2.3