vf: expose input parameters; clear parameters on failure

Preparation (and simplification) for following commits.
This commit is contained in:
wm4 2014-05-01 18:47:07 +02:00
parent 2a9b1d19ba
commit 9243249a0e
2 changed files with 3 additions and 2 deletions

View File

@ -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)

View File

@ -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];