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. --- core/cfg-mplayer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/cfg-mplayer.h') diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h index 6e776f6598..5994f24056 100644 --- a/core/cfg-mplayer.h +++ b/core/cfg-mplayer.h @@ -415,7 +415,7 @@ const m_option_t common_opts[] = { // force video/audio rate: OPT_DOUBLE("fps", force_fps, CONF_MIN, 0), OPT_INTRANGE("srate", force_srate, 0, 1000, 8*48000), - OPT_INTRANGE("channels", audio_output_channels, 0, 1, 8), + OPT_CHMAP("channels", audio_output_channels, CONF_MIN, .min = 1), OPT_AUDIOFORMAT("format", audio_output_format, 0), OPT_FLOATRANGE("speed", playback_speed, 0, 0.01, 100.0), -- cgit v1.2.3