summaryrefslogtreecommitdiffstats
path: root/third_party/aom/test/invalid_file_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/aom/test/invalid_file_test.cc')
-rw-r--r--third_party/aom/test/invalid_file_test.cc44
1 files changed, 26 insertions, 18 deletions
diff --git a/third_party/aom/test/invalid_file_test.cc b/third_party/aom/test/invalid_file_test.cc
index 869f3da66..5b4f5a6c3 100644
--- a/third_party/aom/test/invalid_file_test.cc
+++ b/third_party/aom/test/invalid_file_test.cc
@@ -49,29 +49,31 @@ class InvalidFileTest : public ::libaom_test::DecoderTest,
const libaom_test::CompressedVideoSource &video,
libaom_test::Decoder *decoder) {
EXPECT_TRUE(res_file_ != NULL);
- int expected_res_dec;
+ int expected_res_dec = -1;
// Read integer result.
const int res = fscanf(res_file_, "%d", &expected_res_dec);
EXPECT_NE(res, EOF) << "Read result data failed";
- // Check results match.
- const DecodeParam input = GET_PARAM(1);
- if (input.threads > 1) {
- // The serial decode check is too strict for tile-threaded decoding as
- // there is no guarantee on the decode order nor which specific error
- // will take precedence. Currently a tile-level error is not forwarded so
- // the frame will simply be marked corrupt.
- EXPECT_TRUE(res_dec == expected_res_dec ||
- res_dec == AOM_CODEC_CORRUPT_FRAME)
- << "Results don't match: frame number = " << video.frame_number()
- << ". (" << decoder->DecodeError()
- << "). Expected: " << expected_res_dec << " or "
- << AOM_CODEC_CORRUPT_FRAME;
- } else {
- EXPECT_EQ(expected_res_dec, res_dec)
- << "Results don't match: frame number = " << video.frame_number()
- << ". (" << decoder->DecodeError() << ")";
+ if (expected_res_dec != -1) {
+ // Check results match.
+ const DecodeParam input = GET_PARAM(1);
+ if (input.threads > 1) {
+ // The serial decode check is too strict for tile-threaded decoding as
+ // there is no guarantee on the decode order nor which specific error
+ // will take precedence. Currently a tile-level error is not forwarded
+ // so the frame will simply be marked corrupt.
+ EXPECT_TRUE(res_dec == expected_res_dec ||
+ res_dec == AOM_CODEC_CORRUPT_FRAME)
+ << "Results don't match: frame number = " << video.frame_number()
+ << ". (" << decoder->DecodeError()
+ << "). Expected: " << expected_res_dec << " or "
+ << AOM_CODEC_CORRUPT_FRAME;
+ } else {
+ EXPECT_EQ(expected_res_dec, res_dec)
+ << "Results don't match: frame number = " << video.frame_number()
+ << ". (" << decoder->DecodeError() << ")";
+ }
}
return !HasFailure();
@@ -106,6 +108,12 @@ TEST_P(InvalidFileTest, ReturnCode) { RunTest(); }
const DecodeParam kAV1InvalidFileTests[] = {
{ 1, "invalid-bug-1814.ivf" },
+ { 4, "invalid-oss-fuzz-9463.ivf" },
+ { 1, "invalid-oss-fuzz-9482.ivf" },
+ { 1, "invalid-oss-fuzz-9720.ivf" },
+ { 1, "invalid-oss-fuzz-10061.ivf" },
+ { 1, "invalid-oss-fuzz-10117-mc-buf-use-highbd.ivf" },
+ { 1, "invalid-oss-fuzz-10227.ivf" },
};
AV1_INSTANTIATE_TEST_CASE(InvalidFileTest,