Message ID | AM7PR03MB66607051FFCA45CA707099328FA19@AM7PR03MB6660.eurprd03.prod.outlook.com |
---|---|
State | Accepted |
Commit | db25180e9d0fbb500459d997a05f5752768f604d |
Headers | show |
Series | [FFmpeg-devel,1/5] avcodec/mlpenc: Set AV_PKT_FLAG_KEY manually | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
Andreas Rheinhardt: > 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> > --- > libavcodec/mlpenc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c > index ef01c1d282..d8783b6f56 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); > Will apply this patchset (without the now redundant 3/5 tonight unless there are objections. - Andreas
diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c index ef01c1d282..d8783b6f56 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);
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> --- libavcodec/mlpenc.c | 1 + 1 file changed, 1 insertion(+)