[FFmpeg-devel] [PATCH] libavcodec/mpegaudio_parser.c: differentiate MPEG audio dual mono
Anton Khirnov
anton at khirnov.net
Mon Nov 25 07:42:10 EET 2024
Quoting Scott Theisen (2024-11-14 05:37:49)
> @@ -85,7 +85,13 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
> if (s->header_count > header_threshold) {
> avctx->sample_rate= sr;
> av_channel_layout_uninit(&avctx->ch_layout);
> - av_channel_layout_default(&avctx->ch_layout, channels);
> + if (dual_mono) {
> + av_channel_layout_custom_init(&avctx->ch_layout, 2);
This can fail - the return code should be checked.
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list