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
6f477988
Commit
6f477988
authored
Apr 27, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Avoid potential leak of media source async commands.
parent
e2c6a540
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
media_source.c
dlls/winegstreamer/media_source.c
+10
-0
No files found.
dlls/winegstreamer/media_source.c
View file @
6f477988
...
...
@@ -199,6 +199,7 @@ static HRESULT source_create_async_op(enum source_async_op op, IUnknown **out)
return
E_OUTOFMEMORY
;
command
->
IUnknown_iface
.
lpVtbl
=
&
source_async_command_vtbl
;
command
->
refcount
=
1
;
command
->
op
=
op
;
*
out
=
&
command
->
IUnknown_iface
;
...
...
@@ -302,6 +303,7 @@ static void flush_token_queue(struct media_stream *stream, BOOL send)
command
->
u
.
request_sample
.
token
=
stream
->
token_queue
[
i
];
hr
=
MFPutWorkItem
(
source
->
async_commands_queue
,
&
source
->
async_commands_callback
,
op
);
IUnknown_Release
(
op
);
}
if
(
FAILED
(
hr
))
WARN
(
"Could not enqueue sample request, hr %#lx
\n
"
,
hr
);
...
...
@@ -817,6 +819,7 @@ static HRESULT WINAPI media_stream_RequestSample(IMFMediaStream *iface, IUnknown
command
->
u
.
request_sample
.
token
=
token
;
hr
=
MFPutWorkItem
(
source
->
async_commands_queue
,
&
source
->
async_commands_callback
,
op
);
IUnknown_Release
(
op
);
}
LeaveCriticalSection
(
&
source
->
cs
);
...
...
@@ -1334,6 +1337,7 @@ static HRESULT WINAPI media_source_Start(IMFMediaSource *iface, IMFPresentationD
PropVariantCopy
(
&
command
->
u
.
start
.
position
,
position
);
hr
=
MFPutWorkItem
(
source
->
async_commands_queue
,
&
source
->
async_commands_callback
,
op
);
IUnknown_Release
(
op
);
}
LeaveCriticalSection
(
&
source
->
cs
);
...
...
@@ -1354,7 +1358,10 @@ static HRESULT WINAPI media_source_Stop(IMFMediaSource *iface)
if
(
source
->
state
==
SOURCE_SHUTDOWN
)
hr
=
MF_E_SHUTDOWN
;
else
if
(
SUCCEEDED
(
hr
=
source_create_async_op
(
SOURCE_ASYNC_STOP
,
&
op
)))
{
hr
=
MFPutWorkItem
(
source
->
async_commands_queue
,
&
source
->
async_commands_callback
,
op
);
IUnknown_Release
(
op
);
}
LeaveCriticalSection
(
&
source
->
cs
);
...
...
@@ -1376,7 +1383,10 @@ static HRESULT WINAPI media_source_Pause(IMFMediaSource *iface)
else
if
(
source
->
state
!=
SOURCE_RUNNING
)
hr
=
MF_E_INVALID_STATE_TRANSITION
;
else
if
(
SUCCEEDED
(
hr
=
source_create_async_op
(
SOURCE_ASYNC_PAUSE
,
&
op
)))
{
hr
=
MFPutWorkItem
(
source
->
async_commands_queue
,
&
source
->
async_commands_callback
,
op
);
IUnknown_Release
(
op
);
}
LeaveCriticalSection
(
&
source
->
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