diff options
author | wm4 <wm4@nowhere> | 2015-12-19 17:55:14 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-12-19 18:35:58 +0100 |
commit | 1f7c099dc0feb9a160d9018ad6ad068e0295341a (patch) | |
tree | fb46a991dc1cb41136d4ffab0f08f6308c9abcd6 /video/filter/vf_sub.c | |
parent | 78bfee53dd32bdc70af9294b11a04722a42b10c2 (diff) | |
download | mpv-1f7c099dc0feb9a160d9018ad6ad068e0295341a.tar.bz2 mpv-1f7c099dc0feb9a160d9018ad6ad068e0295341a.tar.xz |
vf: remove old config() callback
Diffstat (limited to 'video/filter/vf_sub.c')
-rw-r--r-- | video/filter/vf_sub.c | 17 |
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; |