1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/zmbvenc: Simplify setting keyframe flag

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-04-24 21:46:09 +02:00
parent 86a71d897f
commit 4e8d22478b

View File

@ -288,10 +288,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
*buf++ = c->fmt; // format
*buf++ = ZMBV_BLOCK; // block width
*buf++ = ZMBV_BLOCK; // block height
pkt->flags |= AV_PKT_FLAG_KEY;
}
memcpy(buf, c->comp_buf, c->zstream.total_out);
pkt->flags |= AV_PKT_FLAG_KEY*keyframe;
*got_packet = 1;
return 0;