From 9243249a0e1fed9bb22213b651f285f796eb4759 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 1 May 2014 18:47:07 +0200 Subject: vf: expose input parameters; clear parameters on failure Preparation (and simplification) for following commits. --- video/filter/vf.c | 4 ++-- video/filter/vf.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'video') diff --git a/video/filter/vf.c b/video/filter/vf.c index e91b1a7ff1..fb3dee6e91 100644 --- a/video/filter/vf.c +++ b/video/filter/vf.c @@ -563,8 +563,8 @@ int vf_reconfig(struct vf_chain *c, const struct mp_image_params *params) break; cur = vf->fmt_out; } - if (r >= 0) - c->output_params = cur; + c->input_params = r < 0 ? (struct mp_image_params){0} : *params; + c->output_params = r < 0 ? (struct mp_image_params){0} : cur; c->initialized = r < 0 ? -1 : 1; int loglevel = r < 0 ? MSGL_WARN : MSGL_V; if (r == -2) diff --git a/video/filter/vf.h b/video/filter/vf.h index 8e73c69256..9ae9740380 100644 --- a/video/filter/vf.h +++ b/video/filter/vf.h @@ -102,6 +102,7 @@ struct vf_chain { struct vf_instance *first, *last; + struct mp_image_params input_params; struct mp_image_params output_params; uint8_t allowed_output_formats[IMGFMT_END - IMGFMT_START]; -- cgit v1.2.3