lavfi/volume: support all channel counts

This commit is contained in:
Stefano Sabatini 2013-12-02 19:44:09 +01:00
parent 830be99ae1
commit d5d51cf04d

View 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);