Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b7f5d908
Commit
b7f5d908
authored
Nov 10, 2022
by
Giovanni Mascellani
Committed by
Alexandre Julliard
May 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Synchronize access to the media source from callbacks.
parent
49af378e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
media_source.c
dlls/winegstreamer/media_source.c
+11
-7
No files found.
dlls/winegstreamer/media_source.c
View file @
b7f5d908
...
...
@@ -557,32 +557,36 @@ static HRESULT WINAPI source_async_commands_Invoke(IMFAsyncCallback *iface, IMFA
IUnknown
*
state
;
HRESULT
hr
;
if
(
source
->
state
==
SOURCE_SHUTDOWN
)
return
S_OK
;
if
(
FAILED
(
hr
=
IMFAsyncResult_GetState
(
result
,
&
state
)))
return
hr
;
EnterCriticalSection
(
&
source
->
cs
);
command
=
impl_from_async_command_IUnknown
(
state
);
switch
(
command
->
op
)
{
case
SOURCE_ASYNC_START
:
start_pipeline
(
source
,
command
);
if
(
source
->
state
!=
SOURCE_SHUTDOWN
)
start_pipeline
(
source
,
command
);
break
;
case
SOURCE_ASYNC_PAUSE
:
pause_pipeline
(
source
);
if
(
source
->
state
!=
SOURCE_SHUTDOWN
)
pause_pipeline
(
source
);
break
;
case
SOURCE_ASYNC_STOP
:
stop_pipeline
(
source
);
if
(
source
->
state
!=
SOURCE_SHUTDOWN
)
stop_pipeline
(
source
);
break
;
case
SOURCE_ASYNC_REQUEST_SAMPLE
:
if
(
source
->
state
==
SOURCE_PAUSED
)
enqueue_token
(
command
->
u
.
request_sample
.
stream
,
command
->
u
.
request_sample
.
token
);
else
else
if
(
source
->
state
==
SOURCE_RUNNING
)
wait_on_sample
(
command
->
u
.
request_sample
.
stream
,
command
->
u
.
request_sample
.
token
);
break
;
}
LeaveCriticalSection
(
&
source
->
cs
);
IUnknown_Release
(
state
);
return
S_OK
;
...
...
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