ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Sat Nov 16 17:56:14 2024 -0300| [64bb91fd3b5a00a8849531c7e8dd207f2a626096] | committer: James Almer
avcodec/aac_parser: set key_frame and profile This is in preparation for a following change. Signed-off-by: James Almer <jamr...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64bb91fd3b5a00a8849531c7e8dd207f2a626096 --- libavcodec/aac_ac3_parser.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c index f45631d09f..e2361d3534 100644 --- a/libavcodec/aac_ac3_parser.c +++ b/libavcodec/aac_ac3_parser.c @@ -40,6 +40,8 @@ int ff_aac_ac3_parse(AVCodecParserContext *s1, int new_frame_start; int got_frame = 0; + s1->key_frame = -1; + if (s1->flags & PARSER_FLAG_COMPLETE_FRAMES) { i = buf_size; got_frame = 1; @@ -145,10 +147,15 @@ get_next: } else { #if CONFIG_AAC_PARSER AACADTSHeaderInfo hdr; + GetBitContext gb; + int profile; + init_get_bits8(&gb, buf, buf_size); if (buf_size < AV_AAC_ADTS_HEADER_SIZE || - ff_adts_header_parse_buf(buf, &hdr) < 0) + ff_adts_header_parse(&gb, &hdr) < 0) return i; + avctx->profile = hdr.object_type - 1; + s1->key_frame = (avctx->profile == AV_PROFILE_AAC_USAC) ? get_bits1(&gb) : 1; bit_rate = hdr.bit_rate; #endif } _______________________________________________ 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".