From 4b5cee4617d0decbf93d06df4f45097fd7e00105 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 6 Apr 2013 22:43:12 +0200 Subject: core: use channel map on demuxer level too This helps passing the channel layout correctly from decoder to audio filter chain. (Because that part "reuses" the demuxer level codec parameters, which is very disgusting.) Note that ffmpeg stuff already passed the channel layout via mp_copy_lav_codec_headers(). So other than easier dealing with the demuxer/decoder parameters mess, there's no real advantage to doing this. Make the --channels option accept a channel map. Since simple numbers map to standard layouts with the given number of channels, this is downwards compatible. Likewise for demux_rawaudio. --- audio/decode/ad_mpg123.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/decode/ad_mpg123.c') diff --git a/audio/decode/ad_mpg123.c b/audio/decode/ad_mpg123.c index 999dc2fbba..45538f42f6 100644 --- a/audio/decode/ad_mpg123.c +++ b/audio/decode/ad_mpg123.c @@ -358,7 +358,7 @@ static int init(sh_audio_t *sh, const char *decoder) con->mean_count = 0; #endif con->vbr = (finfo.vbr != MPG123_CBR); - sh->channels = channels; + mp_chmap_from_channels(&sh->channels, channels); sh->samplerate = rate; /* Without external force, mpg123 will always choose signed encoding, * and non-16-bit only on builds that don't support it. -- cgit v1.2.3