From d42a2b2d16c644875862f9141ad2335cdfc14919 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 28 May 2021 01:04:07 +0000 Subject: [PATCH] videoio(test): bailout from VP9 tests if first frame can't be read --- modules/videoio/test/test_video_io.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/videoio/test/test_video_io.cpp b/modules/videoio/test/test_video_io.cpp index 3934dedf61..8c1f82fa6a 100644 --- a/modules/videoio/test/test_video_io.cpp +++ b/modules/videoio/test/test_video_io.cpp @@ -743,13 +743,25 @@ TEST_P(videocapture_acceleration, read) if (use_umat) { UMat umat; - EXPECT_TRUE(hw_reader.read(umat)); + bool read_umat_result = hw_reader.read(umat); + if (!read_umat_result && i == 0) + { + if (filename == "sample_322x242_15frames.yuv420p.libvpx-vp9.mp4") + throw SkipTestException("Unable to read the first frame with VP9 codec (media stack misconfiguration / bug)"); + } + EXPECT_TRUE(read_umat_result); ASSERT_FALSE(umat.empty()); umat.copyTo(frame); } else { - EXPECT_TRUE(hw_reader.read(frame)); + bool read_result = hw_reader.read(frame); + if (!read_result && i == 0) + { + if (filename == "sample_322x242_15frames.yuv420p.libvpx-vp9.mp4") + throw SkipTestException("Unable to read the first frame with VP9 codec (media stack misconfiguration / bug)"); + } + EXPECT_TRUE(read_result); } ASSERT_FALSE(frame.empty());