From: Steinar H. Gunderson Date: Sat, 12 May 2018 23:34:24 +0000 (+0200) Subject: In FFmpegCapture, fix downmixing of surround signals to stereo. X-Git-Tag: 1.7.3~3 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=fd31923fcc21aeed2c0127f4693b786d114822b8 In FFmpegCapture, fix downmixing of surround signals to stereo. --- diff --git a/ffmpeg_capture.cpp b/ffmpeg_capture.cpp index 235393a..7bd9278 100644 --- a/ffmpeg_capture.cpp +++ b/ffmpeg_capture.cpp @@ -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);