]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/zmbvenc: Simplify setting keyframe flag
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Sat, 24 Apr 2021 19:46:09 +0000 (21:46 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Thu, 29 Apr 2021 00:44:14 +0000 (02:44 +0200)
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
libavcodec/zmbvenc.c

index 27d2954352612d738a75a206584dfe112d347f85..68618f77e9412141d9dcc57f2e5bf6db3d88b826 100644 (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;