diff options
author | wm4 <wm4@nowhere> | 2015-04-03 00:02:40 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-03 00:13:41 +0200 |
commit | 8585845c648ea781269f3bd094f54a3b3674fc51 (patch) | |
tree | c8a315274183a67e1e7e3e841694f6a08afa0640 /video | |
parent | 3d17b12d9cfb26975740d2038e848dfe1e302a75 (diff) | |
download | mpv-8585845c648ea781269f3bd094f54a3b3674fc51.tar.bz2 mpv-8585845c648ea781269f3bd094f54a3b3674fc51.tar.xz |
vf_format: allow forcing display size
Diffstat (limited to 'video')
-rw-r--r-- | video/filter/vf_format.c | 7 |
1 files changed, 7 insertions, 0 deletions
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} }; |