mirror of https://github.com/mpv-player/mpv
client API: fix property notification from non-playloop sources
This code assumed that the function is only called from the playloop itself (and since property notification is done at the end of it, i.e. before sleeping, it obviously would not have needed to wake up the core). But this function is actually called from some comments (such as playlist-move), so this assumption was incorrect. Use the same method as the other function. Untested. Fixes: #7339 (probably)
This commit is contained in:
parent
3a9f0f537f
commit
363048077f
|
@ -1576,8 +1576,10 @@ static void notify_property_events(struct mpv_handle *ctx, int event)
|
|||
ctx->has_pending_properties = true;
|
||||
}
|
||||
}
|
||||
// Note: assume this function is called from the playloop only (at least
|
||||
// if called with events that trigger property changes).
|
||||
|
||||
// Same as in mp_client_property_change().
|
||||
if (ctx->has_pending_properties)
|
||||
mp_dispatch_adjust_timeout(ctx->mpctx->dispatch, 0);
|
||||
}
|
||||
|
||||
// Call with ctx->lock held (only). May temporarily drop the lock.
|
||||
|
|
Loading…
Reference in New Issue