summaryrefslogtreecommitdiffstats
path: root/player/client.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-01-08 02:31:18 +0100
committerwm4 <wm4@nowhere>2020-01-08 02:31:18 +0100
commit4a65c22c500b9c6c96e7578babffcec0c78ef948 (patch)
tree9a426b42a2564be3aca5affb5d51dc282c14cd7d /player/client.h
parenta58585d5e063a97f33a67cc500015c1c30473bcc (diff)
downloadmpv-4a65c22c500b9c6c96e7578babffcec0c78ef948.tar.bz2
mpv-4a65c22c500b9c6c96e7578babffcec0c78ef948.tar.xz
osd: fix possible misses of osd-dimensions property updates
check_obj_resize() in sub/osd.c calls mp_client_broadcast_event(), which calls notify_property_events(). This is pretty unexpected, because check_obj_resize() may be called from the VO thread. While that's sort of awful, it seems to be OK locking-wise. But it breaks an assumption in notify_property_events() that the core doesn't need to be woken up, which could possibly lead to a missed/delayed property update (although rather unlikely). Fix this by explicitly waking up the core when it's called from the OSD code.
Diffstat (limited to 'player/client.h')
-rw-r--r--player/client.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/player/client.h b/player/client.h
index 3408ff17f0..affefe8d71 100644
--- a/player/client.h
+++ b/player/client.h
@@ -39,6 +39,9 @@ struct mpv_global *mp_client_get_global(struct mpv_handle *ctx);
struct MPContext *mp_client_get_core(struct mpv_handle *ctx);
struct MPContext *mp_client_api_get_core(struct mp_client_api *api);
+void mp_client_broadcast_event_external(struct mp_client_api *api, int event,
+ void *data);
+
// m_option.c
void *node_get_alloc(struct mpv_node *node);