ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Sun Apr  7 12:53:15 2024 +0200| [13daafd5c08c96fef94ad420b77799a7301c878a] | 
committer: Andreas Rheinhardt

avcodec/ac3enc: Don't overwrite AVCodecContext.ch_layout

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.rheinha...@outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=13daafd5c08c96fef94ad420b77799a7301c878a
---

 libavcodec/ac3enc.c | 3 ---
 1 file changed, 3 deletions(-)

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;
 }

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to