mfmediaengine: Handle shutdown state in GetCurrentSource().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1ebee86f6d
commit
86c0afc797
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue