Skip to content

Commit 29c0a92

Browse files
mar0xuartie
authored andcommitted
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.
1 parent b97bd1d commit 29c0a92

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/test_va_api_query_config.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ TEST_P(VAAPIQueryConfig, CheckEntrypointsForProfile)
5050
EXPECT_TRUE(numProfiles > 0)
5151
<< numProfiles << " profiles are supported by driver";
5252

53+
profiles.resize(numProfiles);
54+
5355
const int maxEntrypoints = vaMaxNumEntrypoints(m_vaDisplay);
5456
EXPECT_TRUE(maxEntrypoints > 0)
5557
<< maxEntrypoints << " entrypoints are reported";

0 commit comments

Comments
 (0)