instead of avpriv_adts_header_parse(). Using the former avoids
an indirection.

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>
---
 libavcodec/aac_ac3_parser.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index 9305b4c50f..f45631d09f 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -144,10 +144,9 @@ get_next:
 #endif
         } else {
 #if CONFIG_AAC_PARSER
-            AACADTSHeaderInfo hdr, *phrd = &hdr;
-            int ret = avpriv_adts_header_parse(&phrd, buf, buf_size);
-
-            if (ret < 0)
+            AACADTSHeaderInfo hdr;
+            if (buf_size < AV_AAC_ADTS_HEADER_SIZE ||
+                ff_adts_header_parse_buf(buf, &hdr) < 0)
                 return i;
 
             bit_rate = hdr.bit_rate;
-- 
2.40.1

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

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

Reply via email to