diff options
author | 2013-04-06 22:43:12 +0200 | |
---|---|---|
committer | 2013-05-12 21:24:55 +0200 | |
commit | 4b5cee4617d0decbf93d06df4f45097fd7e00105 (patch) | |
tree | b6d293e86d83ab5c3efd99153aa7a7a134d2937f /core/defaultopts.c | |
parent | 586b75ad0840e154835ae67c7720b71bd36f8cc9 (diff) |
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.
Diffstat (limited to 'core/defaultopts.c')
-rw-r--r-- | core/defaultopts.c | 3 |
1 files changed, 2 insertions, 1 deletions
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., |