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.
This commit is contained in:
wm4 2014-05-24 16:16:06 +02:00
parent 6125ba613f
commit 01c3847b80
1 changed files with 3 additions and 2 deletions

View File

@ -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);