mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
81c615f0fe
commit
f7d77b4112
|
@ -332,6 +332,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
static int query_formats(AVFilterContext *ctx)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
AVFilterFormats *in_fmts, *out_fmts;
|
AVFilterFormats *in_fmts, *out_fmts;
|
||||||
static const enum AVPixelFormat in_pix_fmts[] = {
|
static const enum AVPixelFormat in_pix_fmts[] = {
|
||||||
AV_PIX_FMT_YUV420P,
|
AV_PIX_FMT_YUV420P,
|
||||||
|
@ -349,8 +350,12 @@ static int query_formats(AVFilterContext *ctx)
|
||||||
|
|
||||||
in_fmts = ff_make_format_list(in_pix_fmts);
|
in_fmts = ff_make_format_list(in_pix_fmts);
|
||||||
out_fmts = ff_make_format_list(out_pix_fmts);
|
out_fmts = ff_make_format_list(out_pix_fmts);
|
||||||
ff_formats_ref(in_fmts, &ctx->inputs[0]->out_formats);
|
ret = ff_formats_ref(in_fmts, &ctx->inputs[0]->out_formats);
|
||||||
ff_formats_ref(out_fmts, &ctx->outputs[0]->in_formats);
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
ret = ff_formats_ref(out_fmts, &ctx->outputs[0]->in_formats);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue