summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-21 21:34:32 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-28 01:53:11 +0200
commitdb25180e9d0fbb500459d997a05f5752768f604d (patch)
tree508e0ebd3a1f3efe0d2c7737b119ffbf007cdfcd /libavcodec
parent71f2a9a2e53fa0cd9707bc35ce4d56459aad61b7 (diff)
downloadffmpeg-db25180e9d0fbb500459d997a05f5752768f604d.tar.gz
avcodec/mlpenc: Set AV_PKT_FLAG_KEY manually
TrueHD/MLP is one of the audio formats with keyframes. Currently, the generic encoding code just sets the keyframe flag for all returned packets, yet this is wrong for these encoders and will be changed in a future commit. So set the flag here for those packets that ought to have it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mlpenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c
index b2b3297669..1cb02f22a9 100644
--- a/libavcodec/mlpenc.c
+++ b/libavcodec/mlpenc.c
@@ -2114,6 +2114,7 @@ static int mlp_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
restart_frame = !ctx->frame_index;
if (restart_frame) {
+ avpkt->flags |= AV_PKT_FLAG_KEY;
set_major_params(ctx);
if (ctx->min_restart_interval != ctx->max_restart_interval)
process_major_frame(ctx);