mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavf/qsv_overlay: 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
0f0b2ece38
commit
81c615f0fe
@ -415,6 +415,7 @@ static void overlay_qsv_uninit(AVFilterContext *ctx)
|
||||
static int overlay_qsv_query_formats(AVFilterContext *ctx)
|
||||
{
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
static const enum AVPixelFormat main_in_fmts[] = {
|
||||
AV_PIX_FMT_YUV420P,
|
||||
@ -430,10 +431,15 @@ static int overlay_qsv_query_formats(AVFilterContext *ctx)
|
||||
AV_PIX_FMT_NONE
|
||||
};
|
||||
|
||||
for (i = 0; i < ctx->nb_inputs; i++)
|
||||
ff_formats_ref(ff_make_format_list(main_in_fmts), &ctx->inputs[i]->out_formats);
|
||||
for (i = 0; i < ctx->nb_inputs; i++) {
|
||||
ret = ff_formats_ref(ff_make_format_list(main_in_fmts), &ctx->inputs[i]->out_formats);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ff_formats_ref(ff_make_format_list(out_pix_fmts), &ctx->outputs[0]->in_formats);
|
||||
ret = ff_formats_ref(ff_make_format_list(out_pix_fmts), &ctx->outputs[0]->in_formats);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user