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.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/video/filter/vf_sub.c b/video/filter/vf_sub.c
index 20069ee1b1..f44c4c0a67 100644
--- a/video/filter/vf_sub.c
+++ b/video/filter/vf_sub.c
@@ -49,10 +49,11 @@ struct vf_priv_s {
struct mp_osd_res dim;
};
-static int config(struct vf_instance *vf,
- int width, int height, int d_width, int d_height,
- unsigned int flags, unsigned int outfmt)
+static int reconfig(struct vf_instance *vf, struct mp_image_params *in,
+ struct mp_image_params *out)
{
+ int width = in->w, height = in->h, d_width = in->d_w, d_height = in->d_h;
+
vf->priv->outh = height + vf->priv->opt_top_margin +
vf->priv->opt_bottom_margin;
vf->priv->outw = width;
@@ -71,8 +72,12 @@ static int config(struct vf_instance *vf,
.display_par = sar / dar,
};
- return vf_next_config(vf, vf->priv->outw, vf->priv->outh, d_width,
- d_height, flags, outfmt);
+ *out = *in;
+ out->w = vf->priv->outw;
+ out->h = vf->priv->outh;
+ out->d_w = d_width;
+ out->d_h = d_height;
+ return 0;
}
static void prepare_image(struct vf_instance *vf, struct mp_image *dmpi,
@@ -130,7 +135,7 @@ static int control(vf_instance_t *vf, int request, void *data)
static int vf_open(vf_instance_t *vf)
{
- vf->config = config;
+ vf->reconfig = reconfig;
vf->query_format = query_format;
vf->control = control;
vf->filter = filter;