videoio(test): bailout from VP9 tests if first frame can't be read
authorAlexander Alekhin <alexander.alekhin@intel.com>
Fri, 28 May 2021 01:04:07 +0000 (01:04 +0000)
committerAlexander Alekhin <alexander.alekhin@intel.com>
Fri, 28 May 2021 02:05:45 +0000 (02:05 +0000)
modules/videoio/test/test_video_io.cpp

index 3934dedf610c55710d56fe7e7516b1daf2474374..8c1f82fa6af5501822b2860f7893ebd951f4bf09 100644 (file)
@@ -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());