summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--player/video.c3
-rw-r--r--video/filter/vf.h3
-rw-r--r--video/filter/vf_sub.c4
3 files changed, 3 insertions, 7 deletions
diff --git a/player/video.c b/player/video.c
index bd9c82e788..433d5cc618 100644
--- a/player/video.c
+++ b/player/video.c
@@ -176,9 +176,8 @@ static void recreate_video_filters(struct MPContext *mpctx)
vf_append_filter_list(d_video->vfilter, opts->vf_settings);
// for vf_sub
- vf_control_any(d_video->vfilter, VFCTRL_SET_OSD_OBJ, mpctx->osd);
osd_set_render_subs_in_filter(mpctx->osd,
- vf_control_any(d_video->vfilter, VFCTRL_INIT_OSD, NULL) == CONTROL_OK);
+ vf_control_any(d_video->vfilter, VFCTRL_INIT_OSD, mpctx->osd) > 0);
set_allowed_vo_formats(d_video->vfilter, mpctx->video_out);
}
diff --git a/video/filter/vf.h b/video/filter/vf.h
index 76835528b5..62734c99cf 100644
--- a/video/filter/vf.h
+++ b/video/filter/vf.h
@@ -144,13 +144,12 @@ enum vf_ctrl {
VFCTRL_SEEK_RESET = 1, // reset on picture and PTS discontinuities
VFCTRL_SET_EQUALIZER, // set color options (brightness,contrast etc)
VFCTRL_GET_EQUALIZER, // get color options (brightness,contrast etc)
- VFCTRL_INIT_OSD, // Filter OSD renderer present?
VFCTRL_SET_DEINTERLACE, // Set deinterlacing status
VFCTRL_GET_DEINTERLACE, // Get deinterlacing status
VFCTRL_GET_METADATA, // Get frame metadata from lavfi filters (e.g., cropdetect)
/* Hack to make the OSD state object available to vf_sub which
* access OSD/subtitle state outside of normal OSD draw time. */
- VFCTRL_SET_OSD_OBJ,
+ VFCTRL_INIT_OSD,
};
struct vf_chain *vf_new(struct mpv_global *global);
diff --git a/video/filter/vf_sub.c b/video/filter/vf_sub.c
index 775d9449e5..20069ee1b1 100644
--- a/video/filter/vf_sub.c
+++ b/video/filter/vf_sub.c
@@ -121,10 +121,8 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
static int control(vf_instance_t *vf, int request, void *data)
{
switch (request) {
- case VFCTRL_SET_OSD_OBJ:
- vf->priv->osd = data;
- return CONTROL_TRUE;
case VFCTRL_INIT_OSD:
+ vf->priv->osd = data;
return CONTROL_TRUE;
}
return CONTROL_UNKNOWN;