summaryrefslogtreecommitdiff
path: root/libavfilter/avf_showvolume.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/avf_showvolume.c')
-rw-r--r--libavfilter/avf_showvolume.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/libavfilter/avf_showvolume.c b/libavfilter/avf_showvolume.c
index 9accfb068f..95b5388912 100644
--- a/libavfilter/avf_showvolume.c
+++ b/libavfilter/avf_showvolume.c
@@ -85,26 +85,23 @@ static int query_formats(AVFilterContext *ctx)
AVFilterLink *outlink = ctx->outputs[0];
static const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE };
static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_RGBA, AV_PIX_FMT_NONE };
+ int ret;
formats = ff_make_format_list(sample_fmts);
- if (!formats)
- return AVERROR(ENOMEM);
- ff_formats_ref(formats, &inlink->out_formats);
+ if ((ret = ff_formats_ref(formats, &inlink->out_formats)) < 0)
+ return ret;
layouts = ff_all_channel_layouts();
- if (!layouts)
- return AVERROR(ENOMEM);
- ff_channel_layouts_ref(layouts, &inlink->out_channel_layouts);
+ if ((ret = ff_channel_layouts_ref(layouts, &inlink->out_channel_layouts)) < 0)
+ return ret;
formats = ff_all_samplerates();
- if (!formats)
- return AVERROR(ENOMEM);
- ff_formats_ref(formats, &inlink->out_samplerates);
+ if ((ret = ff_formats_ref(formats, &inlink->out_samplerates)) < 0)
+ return ret;
formats = ff_make_format_list(pix_fmts);
- if (!formats)
- return AVERROR(ENOMEM);
- ff_formats_ref(formats, &outlink->in_formats);
+ if ((ret = ff_formats_ref(formats, &outlink->in_formats)) < 0)
+ return ret;
return 0;
}