aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-05-09 16:30:11 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-05-20 12:06:50 +0200
commita2874c5721eb0913575ee9199df45048d9dd87ae (patch)
treefe7369594fd35d2e89ca52155bd53515c89621c7 /libavcodec
parent12ded9cd85be60d9622c438d9a8cfc099028c960 (diff)
downloadffmpeg-a2874c5721eb0913575ee9199df45048d9dd87ae.tar.gz
avcodec/aac_ac3_parser: Use ff_adts_header_parse_buf()
instead of avpriv_adts_header_parse(). Using the former avoids an indirection. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aac_ac3_parser.c7
1 files 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;