From 01c3847b80d32387dfc5aae70f43d914616e3dc1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 24 May 2014 16:16:06 +0200 Subject: client API: fix mpv_observe_property with MP_FORMAT_NONE It returned only 1 change event (after registration), and then went silent. This was accidentally broken some time ago. --- player/client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'player/client.c') diff --git a/player/client.c b/player/client.c index 85a9b0fa9a..0a71e5020d 100644 --- a/player/client.c +++ b/player/client.c @@ -1194,9 +1194,10 @@ static bool gen_property_change_event(struct mpv_handle *ctx) if ((prop->changed || prop->updating) && n < ctx->lowest_changed) ctx->lowest_changed = n; if (prop->changed) { + bool get_value = prop->need_new_value; + prop->need_new_value = false; prop->changed = false; - if (prop->format && prop->need_new_value) { - prop->need_new_value = false; + if (prop->format && get_value) { ctx->properties_updating++; prop->updating = true; mp_dispatch_enqueue(ctx->mpctx->dispatch, update_prop, prop); -- cgit v1.2.3