diff options
Diffstat (limited to 'libavfilter/af_bs2b.c')
-rw-r--r-- | libavfilter/af_bs2b.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/libavfilter/af_bs2b.c b/libavfilter/af_bs2b.c index 25e786761f..592fdec3d7 100644 --- a/libavfilter/af_bs2b.c +++ b/libavfilter/af_bs2b.c @@ -1,18 +1,18 @@ /* - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -106,22 +106,25 @@ static int query_formats(AVFilterContext *ctx) AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_NONE, }; + int ret; if (ff_add_channel_layout(&layouts, AV_CH_LAYOUT_STEREO) != 0) 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 int filter_frame(AVFilterLink *inlink, AVFrame *frame) @@ -168,16 +171,16 @@ static int config_output(AVFilterLink *outlink) bs2b->filter = bs2b_cross_feed_u8; break; case AV_SAMPLE_FMT_S16: - bs2b->filter = bs2b_cross_feed_s16; + bs2b->filter = (void*)bs2b_cross_feed_s16; break; case AV_SAMPLE_FMT_S32: - bs2b->filter = bs2b_cross_feed_s32; + bs2b->filter = (void*)bs2b_cross_feed_s32; break; case AV_SAMPLE_FMT_FLT: - bs2b->filter = bs2b_cross_feed_f; + bs2b->filter = (void*)bs2b_cross_feed_f; break; case AV_SAMPLE_FMT_DBL: - bs2b->filter = bs2b_cross_feed_d; + bs2b->filter = (void*)bs2b_cross_feed_d; break; default: return AVERROR_BUG; |