Commit 5ef7a45b authored by Shaun Ren's avatar Shaun Ren Committed by Alexandre Julliard

mfmediaengine: Pause the session in media_engine_Pause.

parent adbc4b66
...@@ -1952,12 +1952,15 @@ static HRESULT WINAPI media_engine_Pause(IMFMediaEngineEx *iface) ...@@ -1952,12 +1952,15 @@ static HRESULT WINAPI media_engine_Pause(IMFMediaEngineEx *iface)
{ {
if (!(engine->flags & FLAGS_ENGINE_PAUSED)) if (!(engine->flags & FLAGS_ENGINE_PAUSED))
{ {
if (SUCCEEDED(hr = IMFMediaSession_Pause(engine->session)))
{
media_engine_set_flag(engine, FLAGS_ENGINE_WAITING | FLAGS_ENGINE_IS_ENDED, FALSE); media_engine_set_flag(engine, FLAGS_ENGINE_WAITING | FLAGS_ENGINE_IS_ENDED, FALSE);
media_engine_set_flag(engine, FLAGS_ENGINE_PAUSED, TRUE); media_engine_set_flag(engine, FLAGS_ENGINE_PAUSED, TRUE);
IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_TIMEUPDATE, 0, 0); IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_TIMEUPDATE, 0, 0);
IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PAUSE, 0, 0); IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PAUSE, 0, 0);
} }
}
IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS, 0, 0); IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS, 0, 0);
} }
......
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