Skip to content

Commit

Permalink
[core] SetHandle returns DEVICE_FAILED on unsupported systems
Browse files Browse the repository at this point in the history
Fixes: Intel-Media-SDK#2230

Signed-off-by: Dmitry Ermilov <dmitry.ermilov@intel.com>
  • Loading branch information
dmitryermilov committed Nov 18, 2020
1 parent c01136b commit fe740e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _studio/shared/src/libmfx_core_vaapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ mfxStatus VAAPIVideoCORE_T<Base>::SetHandle(
* to get device ID and find out platform type
*/
const auto devItem = getDeviceItem(m_Display);
MFX_CHECK_WITH_ASSERT(MFX_HW_UNKNOWN != devItem.platform, MFX_ERR_UNDEFINED_BEHAVIOR);
MFX_CHECK(MFX_HW_UNKNOWN != devItem.platform, MFX_ERR_DEVICE_FAILED);

m_HWType = devItem.platform;
m_GTConfig = devItem.config;
Expand Down
1 change: 1 addition & 0 deletions doc/mediasdk-man.md
Original file line number Diff line number Diff line change
Expand Up @@ -2050,6 +2050,7 @@ If the specified system handle is a COM interface, the reference counter of the
--- | ---
`MFX_ERR_NONE` | The function completed successfully.
`MFX_ERR_UNDEFINED_BEHAVIOR` | The same handle is redefined. For example, the function has been called twice with the same handle type or internal handle has been created by the SDK before this function call.
`MFX_ERR_DEVICE_FAILED` | The SDK cannot initialize using the handle.

**Change History**

Expand Down

0 comments on commit fe740e0

Please sign in to comment.