[FFmpeg-cvslog] vf_scale_vaapi: Add missing return value checks
Mark Thompson
git at videolan.org
Sun Feb 5 17:41:49 EET 2017
ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Mon Jan 9 00:59:50 2017 +0000| [326b1ed93e25f2b2d505ee88325fabb190d8c275] | committer: Mark Thompson
vf_scale_vaapi: Add missing return value checks
Fixes CID 1374119.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=326b1ed93e25f2b2d505ee88325fabb190d8c275
---
libavfilter/vf_scale_vaapi.c | 11 +++++++----
1 file 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;
}
More information about the ffmpeg-cvslog
mailing list