[NORMATIVE] Use the primary reference frame as prev_frame

Previously LAST_FRAME was used.

BUG=aomedia:1589

Change-Id: I5358e81406afeda4b56de41e55c9c1ab104ec6c4
diff --git a/av1/encoder/segmentation.c b/av1/encoder/segmentation.c
index e90fb07..d77bcb5 100644
--- a/av1/encoder/segmentation.c
+++ b/av1/encoder/segmentation.c
@@ -70,7 +70,9 @@
     const BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type;
     // Test to see if the segment id matches the predicted value.
     const int pred_segment_id =
-        get_segment_id(cm, cm->last_frame_seg_map, bsize, mi_row, mi_col);
+        cm->last_frame_seg_map
+            ? get_segment_id(cm, cm->last_frame_seg_map, bsize, mi_row, mi_col)
+            : 0;
     const int pred_flag = pred_segment_id == segment_id;
     const int pred_context = av1_get_pred_context_seg_id(xd);