From 8585845c648ea781269f3bd094f54a3b3674fc51 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 3 Apr 2015 00:02:40 +0200 Subject: vf_format: allow forcing display size --- video/filter/vf_format.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'video/filter') diff --git a/video/filter/vf_format.c b/video/filter/vf_format.c index e8f1bf1489..eda35cd104 100644 --- a/video/filter/vf_format.c +++ b/video/filter/vf_format.c @@ -41,6 +41,7 @@ struct vf_priv_s { int stereo_in; int stereo_out; int rotate; + int dw, dh; }; static bool is_compatible(int fmt1, int fmt2) @@ -99,6 +100,10 @@ static int reconfig(struct vf_instance *vf, struct mp_image_params *in, out->stereo_out = p->stereo_out; if (p->rotate >= 0) out->rotate = p->rotate; + if (p->dw > 0) + out->d_w = p->dw; + if (p->dh > 0) + out->d_h = p->dh; // Make sure the user-overrides are consistent (no RGB csp for YUV, etc.). mp_image_params_guess_csp(out); @@ -133,6 +138,8 @@ static const m_option_t vf_opts_fields[] = { OPT_CHOICE_C("stereo-in", stereo_in, 0, mp_stereo3d_names), OPT_CHOICE_C("stereo-out", stereo_out, 0, mp_stereo3d_names), OPT_INTRANGE("rotate", rotate, 0, -1, 359), + OPT_INT("dw", dw, 0), + OPT_INT("dh", dh, 0), {0} }; -- cgit v1.2.3