[FFmpeg-cvslog] avcodec/aac_ac3_parser: add preprocessor checks for codec specific code

James Almer git at videolan.org
Sat Jun 24 20:40:29 EEST 2023


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Jun 24 14:37:10 2023 -0300| [35af1695a9ad6f950e03efd156b99898b94dd57c] | committer: James Almer

avcodec/aac_ac3_parser: add preprocessor checks for codec specific code

Should fix ticket #10421.

Signed-off-by: James Almer <jamrial at gmail.com>

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

 libavcodec/aac_ac3_parser.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index 9ab979632d..83d515b5a8 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -95,6 +95,7 @@ get_next:
            duration in seconds is still correct (as is the number of bits in
            the frame). */
         if (avctx->codec_id != AV_CODEC_ID_AAC) {
+#if CONFIG_AC3_PARSER
             AC3HeaderInfo hdr, *phrd = &hdr;
             int offset = ff_ac3_find_syncword(buf, buf_size);
 
@@ -146,7 +147,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
             if (hdr.bitstream_mode == 0x7 && hdr.channels > 1)
                 avctx->audio_service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE;
             bit_rate = hdr.bit_rate;
+#endif
         } else {
+#if CONFIG_AAC_PARSER
             AACADTSHeaderInfo hdr, *phrd = &hdr;
             int ret = avpriv_adts_header_parse(&phrd, buf, buf_size);
 
@@ -154,6 +157,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
                 return i;
 
             bit_rate = hdr.bit_rate;
+#endif
         }
 
         /* Calculate the average bit rate */



More information about the ffmpeg-cvslog mailing list