[FFmpeg-devel] [PATCH 09/11] avcodec/libfdk-aacdec: set key frame flag and profile in output frames
James Almer
jamrial at gmail.com
Mon Nov 18 04:04:21 EET 2024
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavcodec/libfdk-aacdec.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c
index 1324377fb4..ac221645f0 100644
--- a/libavcodec/libfdk-aacdec.c
+++ b/libavcodec/libfdk-aacdec.c
@@ -111,7 +111,7 @@ static const AVClass fdk_aac_dec_class = {
.version = LIBAVUTIL_VERSION_INT,
};
-static int get_stream_info(AVCodecContext *avctx)
+static int get_stream_info(AVCodecContext *avctx, AVFrame *frame)
{
FDKAACDecContext *s = avctx->priv_data;
CStreamInfo *info = aacDecoder_GetStreamInfo(s->handle);
@@ -130,6 +130,9 @@ static int get_stream_info(AVCodecContext *avctx)
}
avctx->sample_rate = info->sampleRate;
avctx->frame_size = info->frameSize;
+ avctx->profile = info->aot - 1;
+
+ frame->flags |= AV_FRAME_FLAG_KEY * !!(info->flags & AC_INDEP);
#if FDKDEC_VER_AT_LEAST(2, 5) // 2.5.10
if (!s->output_delay_set && info->outputDelay) {
// Set this only once.
@@ -413,7 +416,7 @@ static int fdk_aac_decode_frame(AVCodecContext *avctx, AVFrame *frame,
goto end;
}
- if ((ret = get_stream_info(avctx)) < 0)
+ if ((ret = get_stream_info(avctx, frame)) < 0)
goto end;
frame->nb_samples = avctx->frame_size;
--
2.47.0
More information about the ffmpeg-devel
mailing list