[FFmpeg-devel] [PATCH v2 1/5] fftools/ffmpeg_demux: honor -ch_layout options for overriding input stream channel layout

Anton Khirnov anton at khirnov.net
Mon May 27 11:01:27 EEST 2024


Quoting Marton Balint (2024-05-19 21:52:57)
> The code only set the channel layout of the AVFormatContext, so the user could
> not override the channel layout if the demuxer did not have such parameter.
> 
> This used to work via the respective AVCodecContext option, but since
> 639c2f00497257cb60ecaeeac1aacfa80df3be06 it no longer gets passed to the
> decoders. It is actually better if we set it manually, instead of using the
> codec option because that way we can also override it on the stream level, so
> it will also work for stream copy or bitstream filtering.
> 
> We don't allow changing the number of channels, because that can cause
> unexpected results. We disable layout guessing, if a channel layout is
> specified.
> 
> Fixes ticket #11016.
> 
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
>  fftools/ffmpeg_demux.c | 27 ++++++++++++++++++++++++---
>  1 file changed, 24 insertions(+), 3 deletions(-)

Looks ok

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list