ext rc: set frames_since_key for key frame

Bug: 461792087
Change-Id: I01f2222a51d319ce46df77903c72f285f53f4c2b
diff --git a/av1/encoder/gop_structure.c b/av1/encoder/gop_structure.c
index 1de901a..76a8ea2 100644
--- a/av1/encoder/gop_structure.c
+++ b/av1/encoder/gop_structure.c
@@ -911,6 +911,9 @@
                          "av1_extrc_get_gop_decision() failed");
     }
     construct_gop_structure_from_rc(gf_group, &gop_decision);
+    if (gop_decision.gop_frame_list[0].is_key_frame) {
+      rc->frames_since_key = 0;
+    }
   } else {
     if (key_frame) {
       first_frame_update_type = KF_UPDATE;