mfplay: Handle shutdown state on GetMediaItem().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
58d0cb0de0
commit
e2f74ce448
|
@ -998,7 +998,9 @@ static HRESULT WINAPI media_player_GetMediaItem(IMFPMediaPlayer *iface, IMFPMedi
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
|
||||||
EnterCriticalSection(&player->cs);
|
EnterCriticalSection(&player->cs);
|
||||||
if (!player->item)
|
if (player->state == MFP_MEDIAPLAYER_STATE_SHUTDOWN)
|
||||||
|
hr = MF_E_SHUTDOWN;
|
||||||
|
else if (!player->item)
|
||||||
hr = MF_E_NOT_FOUND;
|
hr = MF_E_NOT_FOUND;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -163,7 +163,6 @@ static void test_shutdown(void)
|
||||||
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
|
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
|
||||||
|
|
||||||
hr = IMFPMediaPlayer_GetMediaItem(player, &item);
|
hr = IMFPMediaPlayer_GetMediaItem(player, &item);
|
||||||
todo_wine
|
|
||||||
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
|
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
|
||||||
|
|
||||||
hr = IMFPMediaPlayer_GetVideoWindow(player, &window);
|
hr = IMFPMediaPlayer_GetVideoWindow(player, &window);
|
||||||
|
|
Loading…
Reference in New Issue