diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-01-09 00:59:50 +0000 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-02-05 15:13:16 +0000 |
commit | 326b1ed93e25f2b2d505ee88325fabb190d8c275 (patch) | |
tree | a5f335c10ee175a5898469fd0b518f133cc37981 /libavfilter | |
parent | 55a7e7e3986e661f4b02164739c1ea4eaf83f9cf (diff) | |
download | ffmpeg-streaming-326b1ed93e25f2b2d505ee88325fabb190d8c275.zip ffmpeg-streaming-326b1ed93e25f2b2d505ee88325fabb190d8c275.tar.gz |
vf_scale_vaapi: Add missing return value checks
Fixes CID 1374119.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_scale_vaapi.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c index 604cd95..5e6298a 100644 --- a/libavfilter/vf_scale_vaapi.c +++ b/libavfilter/vf_scale_vaapi.c @@ -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; } |