[FFmpeg-devel] [PATCH] avcodec/avcodec: don't uninitialize ch_layout in avcodec_close()

James Almer jamrial at gmail.com
Sun Mar 20 19:03:08 EET 2022


On 3/19/2022 10:47 AM, Anton Khirnov wrote:
> Quoting James Almer (2022-03-19 04:04:07)
>> The function is not meant to clear codec parameters, and the lavf demux code
>> relies on this behavior.
> 
> Maybe it shouldn't?
> 
> Which code is it exactly?

The parser included by demux.c. That file calls avcodec_close() in 
certain situations, but the avctx is still used when calling 
av_parser_parse2() as it's expected that all the parameters are left 
intact, and all were until 327efa6633, where avctx->ch_layout started 
being uninitialized, and it shouldn't.


More information about the ffmpeg-devel mailing list