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
5ec5eb07
Commit
5ec5eb07
authored
Mar 02, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Add a helper to check for session shutdown state.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0b4e4601
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
session.c
dlls/mf/session.c
+8
-10
No files found.
dlls/mf/session.c
View file @
5ec5eb07
...
...
@@ -454,14 +454,17 @@ static HRESULT create_session_op(enum session_command command, struct session_op
return
S_OK
;
}
static
HRESULT
session_is_shut_down
(
struct
media_session
*
session
)
{
return
session
->
state
==
SESSION_STATE_SHUT_DOWN
?
MF_E_SHUTDOWN
:
S_OK
;
}
static
HRESULT
session_submit_command
(
struct
media_session
*
session
,
struct
session_op
*
op
)
{
HRESULT
hr
;
EnterCriticalSection
(
&
session
->
cs
);
if
(
session
->
state
==
SESSION_STATE_SHUT_DOWN
)
hr
=
MF_E_SHUTDOWN
;
else
if
(
SUCCEEDED
(
hr
=
session_is_shut_down
(
session
)))
hr
=
MFPutWorkItem
(
MFASYNC_CALLBACK_QUEUE_STANDARD
,
&
session
->
commands_callback
,
&
op
->
IUnknown_iface
);
LeaveCriticalSection
(
&
session
->
cs
);
...
...
@@ -707,7 +710,6 @@ static void session_stop(struct media_session *session)
LeaveCriticalSection
(
&
session
->
cs
);
}
static
struct
media_source
*
session_get_media_source
(
struct
media_session
*
session
,
IMFMediaSource
*
source
)
{
struct
media_source
*
cur
;
...
...
@@ -1347,9 +1349,7 @@ static HRESULT WINAPI mfsession_Shutdown(IMFMediaSession *iface)
FIXME
(
"%p.
\n
"
,
iface
);
EnterCriticalSection
(
&
session
->
cs
);
if
(
session
->
state
==
SESSION_STATE_SHUT_DOWN
)
hr
=
MF_E_SHUTDOWN
;
else
if
(
SUCCEEDED
(
hr
=
session_is_shut_down
(
session
)))
{
session
->
state
=
SESSION_STATE_SHUT_DOWN
;
IMFMediaEventQueue_Shutdown
(
session
->
event_queue
);
...
...
@@ -1384,9 +1384,7 @@ static HRESULT WINAPI mfsession_GetSessionCapabilities(IMFMediaSession *iface, D
return
E_POINTER
;
EnterCriticalSection
(
&
session
->
cs
);
if
(
session
->
state
==
SESSION_STATE_SHUT_DOWN
)
hr
=
MF_E_SHUTDOWN
;
else
if
(
SUCCEEDED
(
hr
=
session_is_shut_down
(
session
)))
*
caps
=
session
->
caps
;
LeaveCriticalSection
(
&
session
->
cs
);
...
...
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