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

Nicolas George george at nsup.org
Mon Dec 2 19:53:52 CET 2013


Le duodi 12 frimaire, an CCXXII, Stefano Sabatini a écrit :
> ---
>  libavfilter/af_volume.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c
> index cd24877..4d95476 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);

Does it work? A quick glance at the code seems to indicate you need to
eradicate "av_get_channel_layout_nb_channels(inlink->channel_layout);",
otherwise it will either produce silence or not change the volume at all.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131202/1f7b85d2/attachment.asc>


More information about the ffmpeg-devel mailing list