diff options
author | Paul B Mahol <onemda@gmail.com> | 2015-04-03 17:55:18 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2015-04-08 13:05:06 +0000 |
commit | a0854c084ea1541591c54aaab1f993ebaf92ffaf (patch) | |
tree | 1ebc69023a4f7eb471ce60ff4784b146a8b9973f /libavfilter/af_amix.c | |
parent | 21e034a47a2b407f0896114a995fd507f0f5230f (diff) | |
download | ffmpeg-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_amix.c')
-rw-r--r-- | libavfilter/af_amix.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index ff9af3d0e6..9a3cbd4dcd 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -534,6 +534,7 @@ static int query_formats(AVFilterContext *ctx) { AVFilterFormats *formats = NULL; AVFilterChannelLayouts *layouts; + int ret; layouts = ff_all_channel_layouts(); @@ -542,10 +543,13 @@ static int query_formats(AVFilterContext *ctx) ff_add_format(&formats, AV_SAMPLE_FMT_FLT); ff_add_format(&formats, AV_SAMPLE_FMT_FLTP); - ff_set_common_formats(ctx, formats); - ff_set_common_channel_layouts(ctx, layouts); - ff_set_common_samplerates(ctx, ff_all_samplerates()); - return 0; + ret = ff_set_common_formats(ctx, formats); + if (ret < 0) + return ret; + ret = ff_set_common_channel_layouts(ctx, layouts); + if (ret < 0) + return ret; + return ff_set_common_samplerates(ctx, ff_all_samplerates()); } static const AVFilterPad avfilter_af_amix_outputs[] = { |