Don't use last_frame_seg_map if frame size differs

BUG=aomedia:1303

Change-Id: Ie9fbd1274a4b4e43b548f7377617f74d8e45d89c
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 4e3101a..bac3668 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -750,8 +750,13 @@
     return;
   }
 #if CONFIG_SEGMENT_PRED_LAST
-  if (cm->seg.enabled && !cm->frame_parallel_decode && cm->prev_frame)
+  if (cm->seg.enabled && !cm->frame_parallel_decode && cm->prev_frame &&
+      (cm->mi_rows == cm->prev_frame->mi_rows) &&
+      (cm->mi_cols == cm->prev_frame->mi_cols)) {
     cm->last_frame_seg_map = cm->prev_frame->seg_map;
+  } else {
+    cm->last_frame_seg_map = NULL;
+  }
 #endif
   // Segmentation map update
   if (frame_is_intra_only(cm) || cm->error_resilient_mode) {
@@ -2965,8 +2970,13 @@
       cm->use_prev_frame_mvs =
           cm->use_ref_frame_mvs && frame_can_use_prev_frame_mvs(cm);
 #if CONFIG_SEGMENT_PRED_LAST
-      if (cm->seg.enabled && !cm->frame_parallel_decode)
+      if (cm->seg.enabled && !cm->frame_parallel_decode && cm->prev_frame &&
+          (cm->mi_rows == cm->prev_frame->mi_rows) &&
+          (cm->mi_cols == cm->prev_frame->mi_cols)) {
         cm->last_frame_seg_map = cm->prev_frame->seg_map;
+      } else {
+        cm->last_frame_seg_map = NULL;
+      }
 #endif
 #endif
       for (int i = 0; i < INTER_REFS_PER_FRAME; ++i) {