mfmediaengine: Handle shutdown state in GetNativeVideoSize().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-11-05 19:04:56 +03:00 committed by Alexandre Julliard
parent ef8bf642c7
commit 86a72e055e
2 changed files with 3 additions and 2 deletions

View file

@ -1338,7 +1338,9 @@ static HRESULT WINAPI media_engine_GetNativeVideoSize(IMFMediaEngine *iface, DWO
EnterCriticalSection(&engine->cs);
if (!engine->video_frame.size.cx && !engine->video_frame.size.cy)
if (engine->flags & FLAGS_ENGINE_SHUT_DOWN)
hr = MF_E_SHUTDOWN;
else if (!engine->video_frame.size.cx && !engine->video_frame.size.cy)
hr = E_FAIL;
else
{

View file

@ -379,7 +379,6 @@ todo_wine
ok(!state, "Unexpected state.\n");
hr = IMFMediaEngine_GetNativeVideoSize(media_engine, &cx, &cy);
todo_wine
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFMediaEngine_GetVideoAspectRatio(media_engine, &cx, &cy);