Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-01-09 03:59:50 +0300
committerMark Thompson <sw@jkqxz.net>2017-02-05 18:13:16 +0300
commit326b1ed93e25f2b2d505ee88325fabb190d8c275 (patch)
treea5f335c10ee175a5898469fd0b518f133cc37981 /libavfilter/vf_scale_vaapi.c
parent55a7e7e3986e661f4b02164739c1ea4eaf83f9cf (diff)
vf_scale_vaapi: Add missing return value checks
Fixes CID 1374119.
Diffstat (limited to 'libavfilter/vf_scale_vaapi.c')
-rw-r--r--libavfilter/vf_scale_vaapi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c
index 604cd95767..5e6298a263 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;
}