[FFmpeg-devel] [PATCH 07/11] avcodec/aac/aacdec: set key frame flag in output frames

James Almer jamrial at gmail.com
Mon Nov 18 04:04:19 EET 2024


Don't depend on the generic code setting this.
This is in preparation for a following change.

Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavcodec/aac/aacdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c
index f6e79700d5..717ad8aa90 100644
--- a/libavcodec/aac/aacdec.c
+++ b/libavcodec/aac/aacdec.c
@@ -2196,6 +2196,7 @@ static int aac_decode_er_frame(AVCodecContext *avctx, AVFrame *frame,
 
     ac->frame->nb_samples = samples;
     ac->frame->sample_rate = avctx->sample_rate;
+    ac->frame->flags |= AV_FRAME_FLAG_KEY;
     *got_frame_ptr = 1;
 
     skip_bits_long(gb, get_bits_left(gb));
@@ -2356,6 +2357,7 @@ static int decode_frame_ga(AVCodecContext *avctx, AACDecContext *ac,
     if (samples) {
         ac->frame->nb_samples = samples;
         ac->frame->sample_rate = avctx->sample_rate;
+        ac->frame->flags |= AV_FRAME_FLAG_KEY;
         *got_frame_ptr = 1;
     } else {
         av_frame_unref(ac->frame);
-- 
2.47.0



More information about the ffmpeg-devel mailing list