Fail if showing an existing non-showable frame.

Setting the xd->corrupted flag in the show_existing_frame case has no
effects because the corrupted flag won't be checked if no tiles are
decoded. Call aom_internal_error instead.

Add comments to retroactively describe the bitstream conformance
requirements that the code is intended to enforce. The code was
originally added in commit d492901dc6c8e925db122db590670b6933c69779:
https://aomedia-review.googlesource.com/c/aom/+/44323

This CL changed the error codes for two test vectors for
invalid_file_test.cc, so the result files of those two test vectors are
updated with the new error codes.

BUG=aomedia:2282

Change-Id: I6f27af073c9b8289e455f84196c269554f4e844f
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 5dc8351..0837c9d 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -4719,9 +4719,17 @@
       cm->lf.filter_level[1] = 0;
       cm->show_frame = 1;
 
+      // Section 6.8.2: It is a requirement of bitstream conformance that when
+      // show_existing_frame is used to show a previous frame, that the value
+      // of showable_frame for the previous frame was equal to 1.
       if (!frame_to_show->showable_frame) {
-        aom_merge_corrupted_flag(&xd->corrupted, 1);
+        aom_internal_error(&cm->error, AOM_CODEC_UNSUP_BITSTREAM,
+                           "Buffer does not contain a showable frame");
       }
+      // Section 6.8.2: It is a requirement of bitstream conformance that when
+      // show_existing_frame is used to show a previous frame with
+      // RefFrameType[ frame_to_show_map_idx ] equal to KEY_FRAME, that the
+      // frame is output via the show_existing_frame mechanism at most once.
       if (pbi->reset_decoder_state) frame_to_show->showable_frame = 0;
 
       cm->film_grain_params = frame_to_show->film_grain_params;
diff --git a/test/invalid_file_test.cc b/test/invalid_file_test.cc
index 678698e..8a42a9e 100644
--- a/test/invalid_file_test.cc
+++ b/test/invalid_file_test.cc
@@ -137,8 +137,8 @@
   { 1, "invalid-oss-fuzz-10723.ivf", NULL },
   { 1, "invalid-oss-fuzz-10779.ivf", NULL },
   { 1, "invalid-oss-fuzz-11477.ivf", NULL },
-  { 1, "invalid-oss-fuzz-11479.ivf", NULL },
-  { 1, "invalid-oss-fuzz-11523.ivf", NULL },
+  { 1, "invalid-oss-fuzz-11479.ivf", "invalid-oss-fuzz-11479.ivf.res.2" },
+  { 1, "invalid-oss-fuzz-11523.ivf", "invalid-oss-fuzz-11523.ivf.res.2" },
 };
 
 AV1_INSTANTIATE_TEST_CASE(InvalidFileTest,
diff --git a/test/test-data.sha1 b/test/test-data.sha1
index 31d85bf..6992886 100644
--- a/test/test-data.sha1
+++ b/test/test-data.sha1
@@ -24,8 +24,10 @@
 15932651aacfc4622f0910f728f3f95e08e1753d *invalid-oss-fuzz-11477.ivf.res
 1674787c38ddf82a2e5c804203f04f56a304e8e0 *invalid-oss-fuzz-11479.ivf
 1af486cd2cc83ebeddc76ca7a1c512cc0ec568d5 *invalid-oss-fuzz-11479.ivf.res
+64f8a208dec7f1580fbe0371aa15e62bb1262715 *invalid-oss-fuzz-11479.ivf.res.2
 b1a45514f0c59be03c9991cd04882426b9b930fa *invalid-oss-fuzz-11523.ivf
 7c44ac1723c14d98bcb888fbf118c959511519ba *invalid-oss-fuzz-11523.ivf.res
+3198c7af55a7d50173ce3c369c0cf2d9cdfface6 *invalid-oss-fuzz-11523.ivf.res.2
 ccbe4081557eb44820a0e6337c4a094421826b9a *invalid-oss-fuzz-9288.ivf
 67c54283fe1a26ccf02cc991e4f9a1eea3ac5e78 *invalid-oss-fuzz-9288.ivf.res
 c0960f032484579f967881cc025b71cfd7a79ee1 *invalid-oss-fuzz-9463.ivf
diff --git a/test/test_data_util.cmake b/test/test_data_util.cmake
index e497efa..630c161 100644
--- a/test/test_data_util.cmake
+++ b/test/test_data_util.cmake
@@ -537,8 +537,10 @@
               "invalid-oss-fuzz-11477.ivf.res"
               "invalid-oss-fuzz-11479.ivf"
               "invalid-oss-fuzz-11479.ivf.res"
+              "invalid-oss-fuzz-11479.ivf.res.2"
               "invalid-oss-fuzz-11523.ivf"
               "invalid-oss-fuzz-11523.ivf.res"
+              "invalid-oss-fuzz-11523.ivf.res.2"
               "invalid-oss-fuzz-9288.ivf"
               "invalid-oss-fuzz-9288.ivf.res"
               "invalid-oss-fuzz-9463.ivf"