mf: Fix GetClock() for shutdown state.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5ec5eb0790
commit
de95a03029
|
@ -1364,13 +1364,19 @@ static HRESULT WINAPI mfsession_Shutdown(IMFMediaSession *iface)
|
|||
static HRESULT WINAPI mfsession_GetClock(IMFMediaSession *iface, IMFClock **clock)
|
||||
{
|
||||
struct media_session *session = impl_from_IMFMediaSession(iface);
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("%p, %p.\n", iface, clock);
|
||||
|
||||
EnterCriticalSection(&session->cs);
|
||||
if (SUCCEEDED(hr = session_is_shut_down(session)))
|
||||
{
|
||||
*clock = (IMFClock *)session->clock;
|
||||
IMFClock_AddRef(*clock);
|
||||
}
|
||||
LeaveCriticalSection(&session->cs);
|
||||
|
||||
return S_OK;
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfsession_GetSessionCapabilities(IMFMediaSession *iface, DWORD *caps)
|
||||
|
|
|
@ -1100,6 +1100,7 @@ todo_wine
|
|||
|
||||
hr = IMFClock_GetProperties(clock, &clock_props);
|
||||
ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr);
|
||||
IMFClock_Release(clock);
|
||||
|
||||
IMFRateControl_Release(rate_control);
|
||||
IMFRateSupport_Release(rate_support);
|
||||
|
@ -1117,6 +1118,9 @@ todo_wine
|
|||
hr = IMFMediaSession_Close(session);
|
||||
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IMFMediaSession_GetClock(session, &clock);
|
||||
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
IMFMediaSession_Release(session);
|
||||
|
||||
/* Custom topology loader, GUID is not registered. */
|
||||
|
|
Loading…
Reference in New Issue