Merge "Avoid dividing by 0 in vp8 gf_group bits compute"
diff --git a/vp8/encoder/firstpass.c b/vp8/encoder/firstpass.c
index 72c9642..981c0fd 100644
--- a/vp8/encoder/firstpass.c
+++ b/vp8/encoder/firstpass.c
@@ -2072,9 +2072,10 @@
      * score, otherwise it may be worse off than an "un-boosted" frame
      */
     else {
+      // Avoid division by 0 by clamping cpi->twopass.kf_group_error_left to 1
       int alt_gf_bits =
           (int)((double)cpi->twopass.kf_group_bits * mod_frame_err /
-                DOUBLE_DIVIDE_CHECK((double)cpi->twopass.kf_group_error_left));
+                (double)VPXMAX(cpi->twopass.kf_group_error_left, 1));
 
       if (alt_gf_bits > gf_bits) {
         gf_bits = alt_gf_bits;