Temporal filtering fix to work around an error

This is a temporary fix. The underlying cause is TBD.

BUG=aomedia:2783

Change-Id: I32395b2d3a1eb880f0bdb193e74ea7c15aad6006
diff --git a/av1/encoder/temporal_filter.c b/av1/encoder/temporal_filter.c
index 3b9a401..88cb692 100644
--- a/av1/encoder/temporal_filter.c
+++ b/av1/encoder/temporal_filter.c
@@ -1072,14 +1072,13 @@
   // Filter one more ARF if the lookahead index is leq 7 (w.r.t. 9-th frame).
   // This frame is ALWAYS a show existing frame.
   const int is_second_arf =
-      (update_type == INTNL_ARF_UPDATE) && (filter_frame_lookahead_idx >= 7);
+      (update_type == INTNL_ARF_UPDATE) &&
+      (filter_frame_lookahead_idx >= (cpi->gf_group.is_user_specified ? 5 : 7));
   // TODO(anyone): Currently, we enforce the filtering strength on internal
   // ARFs except the second ARF to be zero. We should investigate in which case
   // it is more beneficial to use non-zero strength filtering.
-  if (!cpi->gf_group.is_user_specified) {
-    if (update_type == INTNL_ARF_UPDATE && !is_second_arf) {
-      return 0;
-    }
+  if (update_type == INTNL_ARF_UPDATE && !is_second_arf) {
+    return 0;
   }
 
   // TODO(yunqing): For INTNL_ARF_UPDATE type, the following me initialization