diff options
author | Paul B Mahol <onemda@gmail.com> | 2015-04-03 20:55:18 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2015-04-08 16:05:06 +0300 |
commit | a0854c084ea1541591c54aaab1f993ebaf92ffaf (patch) | |
tree | 1ebc69023a4f7eb471ce60ff4784b146a8b9973f /libavfilter/af_compand.c | |
parent | 21e034a47a2b407f0896114a995fd507f0f5230f (diff) |
avfilter: handle error in query_formats() in bunch of filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/af_compand.c')
-rw-r--r-- | libavfilter/af_compand.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libavfilter/af_compand.c b/libavfilter/af_compand.c index 4ca73c4522..55ad98a15d 100644 --- a/libavfilter/af_compand.c +++ b/libavfilter/af_compand.c @@ -107,23 +107,26 @@ static int query_formats(AVFilterContext *ctx) AV_SAMPLE_FMT_DBLP, AV_SAMPLE_FMT_NONE }; + int ret; layouts = ff_all_channel_layouts(); if (!layouts) return AVERROR(ENOMEM); - ff_set_common_channel_layouts(ctx, layouts); + ret = ff_set_common_channel_layouts(ctx, layouts); + if (ret < 0) + return ret; formats = ff_make_format_list(sample_fmts); if (!formats) return AVERROR(ENOMEM); - ff_set_common_formats(ctx, formats); + ret = ff_set_common_formats(ctx, formats); + if (ret < 0) + return ret; formats = ff_all_samplerates(); if (!formats) return AVERROR(ENOMEM); - ff_set_common_samplerates(ctx, formats); - - return 0; + return ff_set_common_samplerates(ctx, formats); } static void count_items(char *item_str, int *nb_items) |