summaryrefslogtreecommitdiff
path: root/libavfilter/asrc_anullsrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/asrc_anullsrc.c')
-rw-r--r--libavfilter/asrc_anullsrc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c
index 28d4500a25..94bd0cab3a 100644
--- a/libavfilter/asrc_anullsrc.c
+++ b/libavfilter/asrc_anullsrc.c
@@ -80,10 +80,12 @@ static int query_formats(AVFilterContext *ctx)
ANullContext *null = ctx->priv;
int64_t chlayouts[] = { null->channel_layout, -1 };
int sample_rates[] = { null->sample_rate, -1 };
+ int ret;
- ff_set_common_formats (ctx, ff_all_formats(AVMEDIA_TYPE_AUDIO));
- ff_set_common_channel_layouts(ctx, avfilter_make_format64_list(chlayouts));
- ff_set_common_samplerates (ctx, ff_make_format_list(sample_rates));
+ if ((ret = ff_set_common_formats (ctx, ff_all_formats (AVMEDIA_TYPE_AUDIO))) < 0 ||
+ (ret = ff_set_common_channel_layouts (ctx, avfilter_make_format64_list (chlayouts ))) < 0 ||
+ (ret = ff_set_common_samplerates (ctx, ff_make_format_list (sample_rates ))) < 0)
+ return ret;
return 0;
}