mirror of
https://github.com/mpv-player/mpv
synced 2025-01-25 00:53:22 +00:00
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:
parent
f891eefb5c
commit
623b92465f
@ -116,9 +116,18 @@ error:
|
|||||||
mp_filter_internal_mark_failed(f);
|
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 = {
|
static const struct mp_filter_info vf_sub_filter = {
|
||||||
.name = "sub",
|
.name = "sub",
|
||||||
.process = vf_sub_process,
|
.process = vf_sub_process,
|
||||||
|
.destroy = vf_sub_destroy,
|
||||||
.priv_size = sizeof(struct priv),
|
.priv_size = sizeof(struct priv),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user