diff options
Diffstat (limited to 'video/filter')
-rw-r--r-- | video/filter/vf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/video/filter/vf.c b/video/filter/vf.c index 045b68f774..0d3f5094e5 100644 --- a/video/filter/vf.c +++ b/video/filter/vf.c @@ -568,6 +568,9 @@ static int vf_reconfig_wrapper(struct vf_instance *vf, vf->fmt_out = vf->fmt_in = *p; + if (!mp_image_params_valid(&vf->fmt_in)) + return -2; + int r; if (vf->reconfig) { r = vf->reconfig(vf, &vf->fmt_in, &vf->fmt_out); @@ -580,6 +583,9 @@ static int vf_reconfig_wrapper(struct vf_instance *vf, if (!mp_image_params_equals(&vf->fmt_in, p)) r = -2; + if (!mp_image_params_valid(&vf->fmt_out)) + r = -2; + // Fix csp in case of pixel format change if (r >= 0) mp_image_params_guess_csp(&vf->fmt_out); |