summaryrefslogtreecommitdiffstats
path: root/player/osd.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-09-07 22:26:48 +0200
committerwm4 <wm4@nowhere>2019-09-19 20:37:04 +0200
commit5c7ecad93a771d71a773cace996afd706bbef3d2 (patch)
tree499b4e7d0baba5417180f94641bc355746ed108c /player/osd.c
parentb298140b07842bd3573866564ad30ddfef65638c (diff)
downloadmpv-5c7ecad93a771d71a773cace996afd706bbef3d2.tar.bz2
mpv-5c7ecad93a771d71a773cace996afd706bbef3d2.tar.xz
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.
Diffstat (limited to 'player/osd.c')
-rw-r--r--player/osd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/osd.c b/player/osd.c
index 7d24c01619..00bef58e6b 100644
--- a/player/osd.c
+++ b/player/osd.c
@@ -232,8 +232,8 @@ static char *get_term_status_msg(struct MPContext *mpctx)
if (mpctx->demuxer && demux_is_network_cached(mpctx->demuxer)) {
saddf(&line, " Cache: ");
- struct demux_ctrl_reader_state s = {.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);
if (s.ts_duration < 0) {
saddf(&line, "???");