You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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>
This commit is contained in:
@@ -2114,6 +2114,7 @@ static int mlp_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
|||||||
restart_frame = !ctx->frame_index;
|
restart_frame = !ctx->frame_index;
|
||||||
|
|
||||||
if (restart_frame) {
|
if (restart_frame) {
|
||||||
|
avpkt->flags |= AV_PKT_FLAG_KEY;
|
||||||
set_major_params(ctx);
|
set_major_params(ctx);
|
||||||
if (ctx->min_restart_interval != ctx->max_restart_interval)
|
if (ctx->min_restart_interval != ctx->max_restart_interval)
|
||||||
process_major_frame(ctx);
|
process_major_frame(ctx);
|
||||||
|
Reference in New Issue
Block a user