From 04ea9b366c00d11ff5523a9cbdd0266bfa6ed507 Mon Sep 17 00:00:00 2001 From: Courville Software Date: Sat, 28 Dec 2024 23:16:29 +0100 Subject: [PATCH] Do not force channel layout to stereo when downmixing to stereo when input is not and rely on downmixing code Makes EAC3 7.1 decoding ok See https://github.com/nova-video-player/aos-AVP/issues/1355 --- Source/codec_ffmpeg_audio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/Source/codec_ffmpeg_audio.c b/Source/codec_ffmpeg_audio.c index 29ec56a..360d85e 100644 --- a/Source/codec_ffmpeg_audio.c +++ b/Source/codec_ffmpeg_audio.c @@ -308,8 +308,6 @@ serprintf("cannot find codec\r\n"); p->actx->bit_rate = audio->bytesPerSec * 8; p->actx->channels = audio->channels; p->actx->request_channel_layout = av_get_default_channel_layout(audio->channels); - if (p->request_channels == 2) - p->actx->request_channel_layout = av_get_default_channel_layout(audio->channels ? MIN(2, audio->channels) : 2); DBGCA2 serprintf("requested channel layout id %d for %d channel(s)\r\n", p->actx->request_channel_layout, p->actx->channels);