summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-01 23:06:23 +0200
committerwm4 <wm4@nowhere>2014-05-02 01:09:03 +0200
commitf4eaceee0fe24a59828ce37f61173b1dd2afd8d4 (patch)
tree677ec38121e9b0d5c64ee14e1da9a45def8ab311 /video
parent404953250163fcce550072efcba8d9c55b9cca44 (diff)
downloadmpv-f4eaceee0fe24a59828ce37f61173b1dd2afd8d4.tar.bz2
mpv-f4eaceee0fe24a59828ce37f61173b1dd2afd8d4.tar.xz
vf: sanitize filter input, instead of overriding it
vf_fix_img_params() takes care of overwriting image parameters that are normally not set correctly by filters. But this makes no sense for input images. So instead, check that the input is correct. It still has to be done for the first input image, because that's used to handle some overrides (see video_reconfig_filters()).
Diffstat (limited to 'video')
-rw-r--r--video/filter/vf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/filter/vf.c b/video/filter/vf.c
index 0939631ca4..08391290a3 100644
--- a/video/filter/vf.c
+++ b/video/filter/vf.c
@@ -378,7 +378,7 @@ static int vf_do_filter(struct vf_instance *vf, struct mp_image *img)
{
assert(vf->fmt_in.imgfmt);
if (img)
- vf_fix_img_params(img, &vf->fmt_in);
+ assert(mp_image_params_equals(&img->params, &vf->fmt_in));
if (vf->filter_ext) {
int r = vf->filter_ext(vf, img);
@@ -404,6 +404,7 @@ int vf_filter_frame(struct vf_chain *c, struct mp_image *img)
talloc_free(img);
return -1;
}
+ vf_fix_img_params(img, &c->input_params);
return vf_do_filter(c->first, img);
}