From 29c0a92d0e89424e091542020c3c7793cda72b17 Mon Sep 17 00:00:00 2001 From: Maxim Romanov Date: Mon, 24 Oct 2022 17:45:41 +0300 Subject: [PATCH] test/CheckEntrypointsForProfile: fix for limited profiles VAAPI driver may support less profiles than specified in max_profiles. In this case, elements in profiles vector above the numProfiles have default value (0 or VAProfileMPEG2Simple) and test fails if this profile is not supported. --- test/test_va_api_query_config.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_va_api_query_config.cpp b/test/test_va_api_query_config.cpp index 39a8d1a3..51eff180 100644 --- a/test/test_va_api_query_config.cpp +++ b/test/test_va_api_query_config.cpp @@ -50,6 +50,8 @@ TEST_P(VAAPIQueryConfig, CheckEntrypointsForProfile) EXPECT_TRUE(numProfiles > 0) << numProfiles << " profiles are supported by driver"; + profiles.resize(numProfiles); + const int maxEntrypoints = vaMaxNumEntrypoints(m_vaDisplay); EXPECT_TRUE(maxEntrypoints > 0) << maxEntrypoints << " entrypoints are reported";