Commit 86c0afc7 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfmediaengine: Handle shutdown state in GetCurrentSource().

parent 1ebee86f
......@@ -1464,11 +1464,15 @@ static HRESULT WINAPI media_engine_GetCurrentSource(IMFMediaEngineEx *iface, BST
*url = NULL;
EnterCriticalSection(&engine->cs);
if (engine->flags & FLAGS_ENGINE_SHUT_DOWN)
hr = MF_E_SHUTDOWN;
if (engine->current_source)
{
if (!(*url = SysAllocString(engine->current_source)))
hr = E_OUTOFMEMORY;
}
LeaveCriticalSection(&engine->cs);
return hr;
......
......@@ -319,7 +319,6 @@ static void test_Shutdown(void)
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFMediaEngine_GetCurrentSource(media_engine, &str);
todo_wine
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
state = IMFMediaEngine_GetNetworkState(media_engine);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment