Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfplay/player.c | 4 +++- dlls/mfplay/tests/mfplay.c | 1 - 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/mfplay/player.c b/dlls/mfplay/player.c index a45c5ac9ffa..e061e21acb8 100644 --- a/dlls/mfplay/player.c +++ b/dlls/mfplay/player.c @@ -998,7 +998,9 @@ static HRESULT WINAPI media_player_GetMediaItem(IMFPMediaPlayer *iface, IMFPMedi return E_POINTER;
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; else { diff --git a/dlls/mfplay/tests/mfplay.c b/dlls/mfplay/tests/mfplay.c index c9a07ca9d81..64a48cceaca 100644 --- a/dlls/mfplay/tests/mfplay.c +++ b/dlls/mfplay/tests/mfplay.c @@ -163,7 +163,6 @@ static void test_shutdown(void) ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFPMediaPlayer_GetMediaItem(player, &item); -todo_wine ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFPMediaPlayer_GetVideoWindow(player, &window);