mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avcodec/avcodec: Uninitialize AVChannelLayout before overwriting it
Otherwise, there might be leaks. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
9beba05311
commit
e2e3181519
@ -235,6 +235,7 @@ FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if ((avctx->channels > 0 && avctx->ch_layout.nb_channels != avctx->channels) ||
|
||||
(avctx->channel_layout && (avctx->ch_layout.order != AV_CHANNEL_ORDER_NATIVE ||
|
||||
avctx->ch_layout.u.mask != avctx->channel_layout))) {
|
||||
av_channel_layout_uninit(&avctx->ch_layout);
|
||||
if (avctx->channel_layout) {
|
||||
av_channel_layout_from_mask(&avctx->ch_layout, avctx->channel_layout);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user