From 4a65c22c500b9c6c96e7578babffcec0c78ef948 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 8 Jan 2020 02:31:18 +0100 Subject: 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. --- sub/osd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sub/osd.c') diff --git a/sub/osd.c b/sub/osd.c index c480e19cb2..f7935e3772 100644 --- a/sub/osd.c +++ b/sub/osd.c @@ -242,8 +242,8 @@ static void check_obj_resize(struct osd_state *osd, struct mp_osd_res res, { if (!osd_res_equals(res, obj->vo_res)) { obj->vo_res = res; - mp_client_broadcast_event(mp_client_api_get_core(osd->global->client_api), - MP_EVENT_WIN_RESIZE, NULL); + mp_client_broadcast_event_external(osd->global->client_api, + MP_EVENT_WIN_RESIZE, NULL); } } -- cgit v1.2.3