[FFmpeg-devel] [PATCH] lavfi/volume: support all channel counts

Stefano Sabatini stefasab at gmail.com
Mon Dec 2 23:54:37 CET 2013


On date Monday 2013-12-02 20:25:35 +0100, Nicolas George encoded:
> Le duodi 12 frimaire, an CCXXII, Stefano Sabatini a écrit :
> > Updated, FATE passes here.
> > -- 
> > FFmpeg = Fundamentalist and Freak Magnificient Peaceless Exciting Gospel
> 
> > >From 9a9f41462ff547480ab3c650abbb9386c2642182 Mon Sep 17 00:00:00 2001
> > From: Stefano Sabatini <stefasab at gmail.com>
> > Date: Mon, 2 Dec 2013 19:44:09 +0100
> > Subject: [PATCH] lavfi/volume: support all channel counts
> > 
> > ---
> >  libavfilter/af_volume.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c
> > index cd24877..21fe9a1 100644
> > --- a/libavfilter/af_volume.c
> > +++ b/libavfilter/af_volume.c
> > @@ -101,7 +101,7 @@ static int query_formats(AVFilterContext *ctx)
> >          }
> >      };
> >  
> > -    layouts = ff_all_channel_layouts();
> > +    layouts = ff_all_channel_counts();
> >      if (!layouts)
> >          return AVERROR(ENOMEM);
> >      ff_set_common_channel_layouts(ctx, layouts);
> > @@ -206,7 +206,7 @@ static int config_output(AVFilterLink *outlink)
> >      AVFilterLink *inlink = ctx->inputs[0];
> >  
> >      vol->sample_fmt = inlink->format;
> > -    vol->channels   = av_get_channel_layout_nb_channels(inlink->channel_layout);
> > +    vol->channels   = inlink->channels;
> >      vol->planes     = av_sample_fmt_is_planar(inlink->format) ? vol->channels : 1;
> >  
> >      volume_init(vol);
> 
> It could completely drop vol->channels for link->channels, but that is not
> important, and possibly it would make merging from the fork harder.
> 
> Looks good to me, thanks.

Thanks, applied as is.
-- 
FFmpeg = Faithful and Formidable Meaningful Pitiful Eager Gymnast


More information about the ffmpeg-devel mailing list