summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-14 15:13:58 +0100
committerwm4 <wm4@nowhere>2015-02-14 15:13:58 +0100
commit04472352aedb88884fa4dc9be5ab37ef3980e87d (patch)
treeecc18d1c04e1feb1bc6a7ce5897d68e6fb509f91 /player/command.c
parenta799a4c57f998ed2ef7f5d306d4dad32c173c349 (diff)
downloadmpv-04472352aedb88884fa4dc9be5ab37ef3980e87d.tar.bz2
mpv-04472352aedb88884fa4dc9be5ab37ef3980e87d.tar.xz
player: fix audio-device-list updates
The way the AO wakes up the playloop has nothing to do with events; instead we must query the events on the AO once the playloop was woken up. Querying the events in every playloop iteration is thus the correct way to do this.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index b8a0a7b5ce..9378f53df0 100644
--- a/player/command.c
+++ b/player/command.c
@@ -4875,6 +4875,11 @@ static void command_event(struct MPContext *mpctx, int event, void *arg)
// Update chapters - does nothing if something else is visible.
set_osd_bar_chapters(mpctx, OSD_BAR_SEEK);
}
+}
+
+void handle_command_updates(struct MPContext *mpctx)
+{
+ struct command_ctx *ctx = mpctx->command_ctx;
// This is a bit messy: ao_hotplug wakes up the player, and then we have
// to recheck the state. Then the client(s) will read the property.