diff mbox series

[FFmpeg-devel,02/17] avcodec/ac3enc: Don't overwrite AVCodecContext.ch_layout

Message ID GV1P250MB0737A3D8F6B2113EE85968BC8F012@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 13daafd5c08c96fef94ad420b77799a7301c878a
Headers show
Series [FFmpeg-devel,01/17] avcodec/ac3enc: Don't presume ch_layout to be AV_CHANNEL_ORDER_NATIVE | expand


Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt April 7, 2024, 9:09 p.m. UTC
This is unnecessary (the channel layout guessing code became
moot when the channel layouts were enforced generically)
and also dangerous, as a custom channel layout mapping
would leak in case one was used.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
 libavcodec/ac3enc.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series


diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index dc197c1517..f6456b2a22 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -2224,9 +2224,6 @@  static av_cold int set_channel_info(AVCodecContext *avctx)
     s->has_surround =  s->channel_mode & 0x04;
     s->channel_map  = ac3_enc_channel_map[s->channel_mode][s->lfe_on];
-    if (s->lfe_on)
-        mask |= AV_CH_LOW_FREQUENCY;
-    av_channel_layout_from_mask(&avctx->ch_layout, mask);
     return 0;