Skip to content

Commit

Permalink
test/CheckEntrypointsForProfile: fix for limited profiles
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mar0x authored and uartie committed Mar 12, 2024
1 parent b97bd1d commit 29c0a92
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/test_va_api_query_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 29c0a92

Please sign in to comment.