summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_sub.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/filter/vf_sub.c')
-rw-r--r--video/filter/vf_sub.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/video/filter/vf_sub.c b/video/filter/vf_sub.c
index 5c49ac56a3..de7f787744 100644
--- a/video/filter/vf_sub.c
+++ b/video/filter/vf_sub.c
@@ -18,8 +18,6 @@
*/
-#include "config.h"
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -27,7 +25,6 @@
#include <assert.h>
#include <libavutil/common.h>
-#include "config.h"
#include "common/msg.h"
#include "filters/filter.h"
#include "filters/filter_internal.h"
@@ -116,9 +113,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),
};
@@ -130,8 +136,6 @@ static struct mp_filter *vf_sub_create(struct mp_filter *parent, void *options)
return NULL;
}
- MP_WARN(f, "This filter is deprecated and will be removed (no replacement)\n");
-
mp_filter_add_pin(f, MP_PIN_IN, "in");
mp_filter_add_pin(f, MP_PIN_OUT, "out");