Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
318aa0f3
Commit
318aa0f3
authored
Jan 28, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfmediaengine: Handle shutdown state in Pause().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0f4f7ca9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
main.c
dlls/mfmediaengine/main.c
+14
-8
mfmediaengine.c
dlls/mfmediaengine/tests/mfmediaengine.c
+0
-1
No files found.
dlls/mfmediaengine/main.c
View file @
318aa0f3
...
@@ -1820,25 +1820,31 @@ static HRESULT WINAPI media_engine_Play(IMFMediaEngineEx *iface)
...
@@ -1820,25 +1820,31 @@ static HRESULT WINAPI media_engine_Play(IMFMediaEngineEx *iface)
static
HRESULT
WINAPI
media_engine_Pause
(
IMFMediaEngineEx
*
iface
)
static
HRESULT
WINAPI
media_engine_Pause
(
IMFMediaEngineEx
*
iface
)
{
{
struct
media_engine
*
engine
=
impl_from_IMFMediaEngineEx
(
iface
);
struct
media_engine
*
engine
=
impl_from_IMFMediaEngineEx
(
iface
);
HRESULT
hr
=
S_OK
;
TRACE
(
"%p.
\n
"
,
iface
);
TRACE
(
"%p.
\n
"
,
iface
);
EnterCriticalSection
(
&
engine
->
cs
);
EnterCriticalSection
(
&
engine
->
cs
);
if
(
!
(
engine
->
flags
&
FLAGS_ENGINE_PAUSED
))
if
(
engine
->
flags
&
FLAGS_ENGINE_SHUT_DOWN
)
hr
=
MF_E_SHUTDOWN
;
else
{
{
media_engine_set_flag
(
engine
,
FLAGS_ENGINE_WAITING
|
FLAGS_ENGINE_IS_ENDED
,
FALSE
);
if
(
!
(
engine
->
flags
&
FLAGS_ENGINE_PAUSED
))
media_engine_set_flag
(
engine
,
FLAGS_ENGINE_PAUSED
,
TRUE
);
{
media_engine_set_flag
(
engine
,
FLAGS_ENGINE_WAITING
|
FLAGS_ENGINE_IS_ENDED
,
FALSE
);
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
);
}
LeaveCriticalSection
(
&
engine
->
cs
);
LeaveCriticalSection
(
&
engine
->
cs
);
return
S_OK
;
return
hr
;
}
}
static
BOOL
WINAPI
media_engine_GetMuted
(
IMFMediaEngineEx
*
iface
)
static
BOOL
WINAPI
media_engine_GetMuted
(
IMFMediaEngineEx
*
iface
)
...
...
dlls/mfmediaengine/tests/mfmediaengine.c
View file @
318aa0f3
...
@@ -417,7 +417,6 @@ todo_wine
...
@@ -417,7 +417,6 @@ todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaEngine_Pause
(
media_engine
);
hr
=
IMFMediaEngine_Pause
(
media_engine
);
todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
state
=
IMFMediaEngine_GetMuted
(
media_engine
);
state
=
IMFMediaEngine_GetMuted
(
media_engine
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment