]> granicus.if.org Git - libvpx/commitdiff
Fix counter of fixed keyframe distance
authorAndoni Morales Alastruey <ylatuya@gmail.com>
Mon, 7 Feb 2011 17:04:02 +0000 (18:04 +0100)
committerAndoni Morales Alastruey <ylatuya@gmail.com>
Mon, 7 Feb 2011 17:30:04 +0000 (18:30 +0100)
When the keyframe distance is fixed the first interval has the right
distance but, the next ones have kf_distance + 1.

Change-Id: I44f1190fe7146124bd07660a5e0ef08829e3ae07

vp8/vp8_cx_iface.c

index b23bd951df6a7ddcb3fde2d6a51c5f372b593690..29c644446ae0159e274bd6d9c1a64d3d9ec92edd 100644 (file)
@@ -706,7 +706,7 @@ static vpx_codec_err_t vp8e_encode(vpx_codec_alg_priv_t  *ctx,
         if (++ctx->fixed_kf_cntr > ctx->cfg.kf_min_dist)
         {
             flags |= VPX_EFLAG_FORCE_KF;
-            ctx->fixed_kf_cntr = 0;
+            ctx->fixed_kf_cntr = 1;
         }
     }