diff --git a/vp8/encoder/firstpass.c b/vp8/encoder/firstpass.c
index 3e67bf53c7e1f309a1b77bda4c2308a31852dea6..06e26be85f35ca7c9f14fe68b8887a9136dd5de4 100644
--- a/vp8/encoder/firstpass.c
+++ b/vp8/encoder/firstpass.c
@@ -2423,7 +2423,7 @@ void vp8_find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
     if (cpi->oxcf.auto_key
         && cpi->frames_to_key > (int)cpi->key_frame_frequency )
     {
-        int current_pos = cpi->stats_in;
+        FIRSTPASS_STATS *current_pos = cpi->stats_in;
         FIRSTPASS_STATS tmp_frame;
 
         cpi->frames_to_key /= 2;