pass2_strategy.c: Modify an assert.

This assert may not be true in 1 pass encoding, as 1 pass encoding does
not know where the input file ends beforehand.

So, we check the assertion only in case of 2-pass encoding.

Similar to commit 7b512b243b578ab70dd6a539525f471b6e1dbebf for research
branch.

BUG=aomedia:2936

Change-Id: I6f908b7696412893f383af7aadb127a32c27243e
diff --git a/av1/encoder/pass2_strategy.c b/av1/encoder/pass2_strategy.c
index f31dc70..7f506f4 100644
--- a/av1/encoder/pass2_strategy.c
+++ b/av1/encoder/pass2_strategy.c
@@ -2110,7 +2110,8 @@
       (int)av1_lookahead_depth(cpi->lookahead, cpi->compressor_stage);
   if (lookahead_size <
       av1_lookahead_pop_sz(cpi->lookahead, cpi->compressor_stage)) {
-    assert(IMPLIES(cpi->frames_left > 0, lookahead_size == cpi->frames_left));
+    assert(IMPLIES(cpi->oxcf.pass != 0 && cpi->frames_left > 0,
+                   lookahead_size == cpi->frames_left));
     cpi->rc.frames_to_key = AOMMIN(cpi->rc.frames_to_key, lookahead_size);
   } else if (cpi->frames_left > 0) {
     // Correct frames to key based on limit