[FFmpeg-cvslog] avcodec/aac/aacdec: set keyframe flag in output frames

James Almer git at videolan.org
Sun Dec 1 18:47:46 EET 2024


ffmpeg | branch: release/7.1 | James Almer <jamrial at gmail.com> | Sat Nov 16 20:28:38 2024 -0300| [1b5bdce86a762815d2582c59c30e8f5c8f9140d3] | committer: James Almer

avcodec/aac/aacdec: set keyframe flag in output frames

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>
(cherry picked from commit faea08b722de716391c3f84a265060c643ad6c22)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1b5bdce86a762815d2582c59c30e8f5c8f9140d3
---

 libavcodec/aac/aacdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c
index 4110bc40ca..038251d266 100644
--- a/libavcodec/aac/aacdec.c
+++ b/libavcodec/aac/aacdec.c
@@ -2194,6 +2194,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));
@@ -2354,6 +2355,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);



More information about the ffmpeg-cvslog mailing list