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.
This commit is contained in:
Your Name 2021-05-07 14:51:21 +02:00
parent f891eefb5c
commit 623b92465f
1 changed files with 9 additions and 0 deletions

View File

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