From 7971bb87cb46f90152913de6ac673ae3bd1637a3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 5 Apr 2013 20:39:52 +0200 Subject: af: use mp_chmap for mp_audio, include channel map in format negotiation Now af_lavrresample pretends to reorder the channels, although it doesn't yet, and nothing sets non-standard layouts either. --- audio/filter/af_lavcac3enc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'audio/filter/af_lavcac3enc.c') diff --git a/audio/filter/af_lavcac3enc.c b/audio/filter/af_lavcac3enc.c index 5be8df2b51..b4b4fd4a1d 100644 --- a/audio/filter/af_lavcac3enc.c +++ b/audio/filter/af_lavcac3enc.c @@ -83,7 +83,8 @@ static int control(struct af_instance *af, int cmd, void *arg) if (data->nch > AC3_MAX_CHANNELS) mp_audio_set_num_channels(af->data, AC3_MAX_CHANNELS); else - mp_audio_set_num_channels(af->data, data->nch); + mp_audio_set_channels(af->data, &data->channels); + mp_chmap_reorder_to_lavc(&af->data->channels); test_output_res = af_test_output(af, data); s->pending_len = 0; @@ -107,8 +108,7 @@ static int control(struct af_instance *af, int cmd, void *arg) // Put sample parameters s->lavc_actx->channels = af->data->nch; - s->lavc_actx->channel_layout = - av_get_default_channel_layout(af->data->nch); + s->lavc_actx->channel_layout = mp_chmap_to_lavc(&af->data->channels); s->lavc_actx->sample_rate = af->data->rate; s->lavc_actx->bit_rate = bit_rate; -- cgit v1.2.3