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/defaultopts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/defaultopts.c') diff --git a/core/defaultopts.c b/core/defaultopts.c index 75a3b8d226..f1778f2fff 100644 --- a/core/defaultopts.c +++ b/core/defaultopts.c @@ -4,6 +4,7 @@ #include "defaultopts.h" #include "core/options.h" #include "audio/mixer.h" +#include "audio/chmap.h" void set_default_mplayer_options(struct MPOpts *opts) { @@ -71,7 +72,7 @@ void set_default_mplayer_options(struct MPOpts *opts) .audio_display = 1, .sub_visibility = 1, .extension_parsing = 1, - .audio_output_channels = 2, + .audio_output_channels = MP_CHMAP_INIT_STEREO, .audio_output_format = -1, // AF_FORMAT_UNKNOWN .playback_speed = 1., .movie_aspect = -1., -- cgit v1.2.3