1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

Don't attempt to parse ADTS from USAC packets.

It's not possible to put USAC into ADTS due to exceeding the
field size (4 bits) for ADTS profile. As such cases where
the frame starts with 0xfff shouldn't be checked.

This ensures the sample at https://crbug.com/396190942 is
properly detected as USAC content.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
This commit is contained in:
Dale Curtis
2025-02-24 16:52:10 -08:00
committed by Lynne
parent 72cff47be7
commit 696ea1c223

View File

@ -2391,7 +2391,8 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame,
ac->frame = frame;
*got_frame_ptr = 0;
if (show_bits(gb, 12) == 0xfff) {
// USAC can't be packed into ADTS due to field size limitations.
if (show_bits(gb, 12) == 0xfff && ac->oc[1].m4ac.object_type != AOT_USAC) {
if ((err = parse_adts_frame_header(ac, gb)) < 0) {
av_log(avctx, AV_LOG_ERROR, "Error decoding AAC frame header.\n");
goto fail;