summaryrefslogtreecommitdiff
path: root/libavfilter/vf_vpp_qsv.c
diff options
context:
space:
mode:
authorZhong Li <zhong.li@intel.com>2017-11-20 04:14:34 -0500
committerMark Thompson <sw@jkqxz.net>2017-11-20 15:47:05 +0000
commitf7d77b4112f70a15552fbce2ce3d10a4186571b1 (patch)
tree179d59f55922a846dfa6e25d41645a56fcf68747 /libavfilter/vf_vpp_qsv.c
parent81c615f0feb2a871b75c7fa6d895e7e92a570f7c (diff)
lavf/qsv_vpp: check the return value of ff_formats_ref()
Fixes the build warning of "ignoring return value of ‘ff_formats_ref’, declared with attribute warn_unused_result" Signed-off-by: Zhong Li <zhong.li@intel.com> Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
Diffstat (limited to 'libavfilter/vf_vpp_qsv.c')
-rw-r--r--libavfilter/vf_vpp_qsv.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
index eb2f1cc7eb..bd5fc32299 100644
--- a/libavfilter/vf_vpp_qsv.c
+++ b/libavfilter/vf_vpp_qsv.c
@@ -332,6 +332,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
static int query_formats(AVFilterContext *ctx)
{
+ int ret;
AVFilterFormats *in_fmts, *out_fmts;
static const enum AVPixelFormat in_pix_fmts[] = {
AV_PIX_FMT_YUV420P,
@@ -349,8 +350,12 @@ static int query_formats(AVFilterContext *ctx)
in_fmts = ff_make_format_list(in_pix_fmts);
out_fmts = ff_make_format_list(out_pix_fmts);
- ff_formats_ref(in_fmts, &ctx->inputs[0]->out_formats);
- ff_formats_ref(out_fmts, &ctx->outputs[0]->in_formats);
+ ret = ff_formats_ref(in_fmts, &ctx->inputs[0]->out_formats);
+ if (ret < 0)
+ return ret;
+ ret = ff_formats_ref(out_fmts, &ctx->outputs[0]->in_formats);
+ if (ret < 0)
+ return ret;
return 0;
}