Terminate decoding at invalid mode and ref frame combo

BUG=b/69488541

Change-Id: I2113bba4589f61a09d0dd07c64a522f4d0ae304b
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 6706abd..f8dd6d9 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -2347,6 +2347,12 @@
     }
   }
 
+  if (is_compound != is_inter_compound_mode(mbmi->mode)) {
+    aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
+                       "Prediction mode %d invalid with ref frame %d %d",
+                       mbmi->mode, mbmi->ref_frame[0], mbmi->ref_frame[1]);
+  }
+
 #if CONFIG_EXT_INTER
   if ((bsize < BLOCK_8X8 && !unify_bsize) ||
       (mbmi->mode != ZEROMV && mbmi->mode != ZERO_ZEROMV))