1
0

Don't query a device ID when using runtime config

The settings are not going to be persisted, and the device is not going
to change between the setting and running the decoder.
This commit is contained in:
Hendrik Leppkes 2024-06-14 16:27:52 +02:00
parent 56aab6a4cc
commit 0bb8be4b50
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5

View File

@ -2925,7 +2925,7 @@ STDMETHODIMP CLAVVideo::SetHWAccelDeviceIndex(LAVHWAccel hwAccel, DWORD dwIndex,
{
HRESULT hr = S_OK;
if (dwIndex != LAVHWACCEL_DEVICE_DEFAULT && dwDeviceIdentifier == 0)
if (dwIndex != LAVHWACCEL_DEVICE_DEFAULT && dwDeviceIdentifier == 0 && !m_bRuntimeConfig)
hr = GetHWAccelDeviceInfo(hwAccel, dwIndex, nullptr, &dwDeviceIdentifier);
if (SUCCEEDED(hr))