diff options
author | Your Name <you@example.com> | 2021-05-07 14:51:21 +0200 |
---|---|---|
committer | Your Name <you@example.com> | 2021-05-07 15:01:15 +0200 |
commit | 623b92465fa73d9dfb24a58c443d313bbaeeecc5 (patch) | |
tree | 93e1ca22e3c17ebbf464bb3784decaed3054ec41 /video/filter | |
parent | f891eefb5c1c8e0d0991a9257ca389f8dcf86a2a (diff) | |
download | mpv-623b92465fa73d9dfb24a58c443d313bbaeeecc5.tar.bz2 mpv-623b92465fa73d9dfb24a58c443d313bbaeeecc5.tar.xz |
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.
Diffstat (limited to 'video/filter')
-rw-r--r-- | video/filter/vf_sub.c | 9 |
1 files changed, 9 insertions, 0 deletions
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), }; |