vf_scale_vaapi: Add missing return value checks

Fixes CID 1374119.
This commit is contained in:
Mark Thompson 2017-01-09 00:59:50 +00:00
parent 55a7e7e398
commit 326b1ed93e

View File

@ -65,11 +65,14 @@ static int scale_vaapi_query_formats(AVFilterContext *avctx)
enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_VAAPI, AV_PIX_FMT_NONE,
};
int err;
ff_formats_ref(ff_make_format_list(pix_fmts),
&avctx->inputs[0]->out_formats);
ff_formats_ref(ff_make_format_list(pix_fmts),
&avctx->outputs[0]->in_formats);
if ((err = ff_formats_ref(ff_make_format_list(pix_fmts),
&avctx->inputs[0]->out_formats)) < 0)
return err;
if ((err = ff_formats_ref(ff_make_format_list(pix_fmts),
&avctx->outputs[0]->in_formats)) < 0)
return err;
return 0;
}