]> git.sesse.net Git - nageru/commitdiff
In FFmpegCapture, fix downmixing of surround signals to stereo.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 12 May 2018 23:34:24 +0000 (01:34 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 12 May 2018 23:34:24 +0000 (01:34 +0200)
ffmpeg_capture.cpp

index 235393a5058b0a2215a8ea021becc6c1fc75ab9a..7bd927801359b5906db8cec4641557c1898a82ed 100644 (file)
@@ -751,7 +751,7 @@ void FFmpegCapture::convert_audio(const AVFrame *audio_avframe, FrameAllocator::
                }
 
                av_opt_set_int(resampler, "in_channel_layout",  channel_layout,                             0);
-               av_opt_set_int(resampler, "out_channel_layout", AV_CH_LAYOUT_STEREO,                        0);
+               av_opt_set_int(resampler, "out_channel_layout", AV_CH_LAYOUT_STEREO_DOWNMIX,                0);
                av_opt_set_int(resampler, "in_sample_rate",     av_frame_get_sample_rate(audio_avframe),    0);
                av_opt_set_int(resampler, "out_sample_rate",    OUTPUT_FREQUENCY,                           0);
                av_opt_set_int(resampler, "in_sample_fmt",      audio_avframe->format,                      0);