lavfi/volume: support all channel counts
authorStefano Sabatini <stefasab@gmail.com>
Mon, 2 Dec 2013 18:44:09 +0000 (19:44 +0100)
committerStefano Sabatini <stefasab@gmail.com>
Mon, 2 Dec 2013 22:52:24 +0000 (23:52 +0100)
libavfilter/af_volume.c

index cd248772e521d968faddecde20d959d134518395..21fe9a15e0e2f73f43987970198caac8b11ef87c 100644 (file)
@@ -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);