aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/af_volume.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2015-04-03 17:55:18 +0000
committerPaul B Mahol <onemda@gmail.com>2015-04-08 13:05:06 +0000
commita0854c084ea1541591c54aaab1f993ebaf92ffaf (patch)
tree1ebc69023a4f7eb471ce60ff4784b146a8b9973f /libavfilter/af_volume.c
parent21e034a47a2b407f0896114a995fd507f0f5230f (diff)
downloadffmpeg-a0854c084ea1541591c54aaab1f993ebaf92ffaf.tar.gz
avfilter: handle error in query_formats() in bunch of filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/af_volume.c')
-rw-r--r--libavfilter/af_volume.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c
index 8d49c65163..54bffa6015 100644
--- a/libavfilter/af_volume.c
+++ b/libavfilter/af_volume.c
@@ -153,23 +153,26 @@ static int query_formats(AVFilterContext *ctx)
AV_SAMPLE_FMT_NONE
}
};
+ int ret;
layouts = ff_all_channel_counts();
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[vol->precision]);
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 inline void scale_samples_u8(uint8_t *dst, const uint8_t *src,