From 623b92465fa73d9dfb24a58c443d313bbaeeecc5 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 7 May 2021 14:51:21 +0200 Subject: vf_sub: restore OSD if removed When inserting vf_sub, the VO OSD is directed not to draw itself. But this flag was never unset, even when removing vf_sub. The fix is pretty shit, but appears to work. --- video/filter/vf_sub.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'video') diff --git a/video/filter/vf_sub.c b/video/filter/vf_sub.c index 5c49ac56a3..2ed6a2c07f 100644 --- a/video/filter/vf_sub.c +++ b/video/filter/vf_sub.c @@ -116,9 +116,18 @@ error: mp_filter_internal_mark_failed(f); } +static void vf_sub_destroy(struct mp_filter *f) +{ + struct mp_stream_info *info = mp_filter_find_stream_info(f); + struct osd_state *osd = info ? info->osd : NULL; + if (osd) + osd_set_render_subs_in_filter(osd, false); +} + static const struct mp_filter_info vf_sub_filter = { .name = "sub", .process = vf_sub_process, + .destroy = vf_sub_destroy, .priv_size = sizeof(struct priv), }; -- cgit v1.2.3