diff options
author | Andreas Öman <andreas@lonelycoder.com> | 2007-12-15 07:05:14 +0000 |
---|---|---|
committer | Andreas Öman <andreas@lonelycoder.com> | 2007-12-15 07:05:14 +0000 |
commit | 94eadc8ba0c8953c916acb0c431aabe5cdc8427d (patch) | |
tree | d4173f1b9e451ff4ead685ea8a597f43a2ed224d /ffplay.c | |
parent | 2886f3113eb25352999a5cf65af5302520b8a6bb (diff) | |
download | ffmpeg-94eadc8ba0c8953c916acb0c431aabe5cdc8427d.tar.gz |
SDL does not seem to support more than two channels.
So, if this is the case, ask for downmixing by the codec.
Originally committed as revision 11223 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1695,10 +1695,12 @@ static int stream_component_open(VideoState *is, int stream_index) if (enc->codec_type == CODEC_TYPE_AUDIO) { wanted_spec.freq = enc->sample_rate; wanted_spec.format = AUDIO_S16SYS; - /* hack for AC3. XXX: suppress that */ - if (enc->channels > 2) - enc->channels = 2; - wanted_spec.channels = enc->channels; + if(enc->channels > 2) { + wanted_spec.channels = 2; + enc->request_channels = 2; + } else { + wanted_spec.channels = enc->channels; + } wanted_spec.silence = 0; wanted_spec.samples = SDL_AUDIO_BUFFER_SIZE; wanted_spec.callback = sdl_audio_callback; |