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
be50a789
Commit
be50a789
authored
Apr 27, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Only break cyclic references in IMFMediaSource_Shutdown.
parent
3eb9571d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
24 deletions
+14
-24
media_source.c
dlls/winegstreamer/media_source.c
+14
-24
No files found.
dlls/winegstreamer/media_source.c
View file @
be50a789
...
...
@@ -697,8 +697,9 @@ static ULONG WINAPI media_stream_Release(IMFMediaStream *iface)
if
(
!
ref
)
{
if
(
stream
->
event_queue
)
IMFMediaEventQueue_Release
(
stream
->
event_queue
);
IMFMediaSource_Release
(
stream
->
media_source
);
IMFStreamDescriptor_Release
(
stream
->
descriptor
);
IMFMediaEventQueue_Release
(
stream
->
event_queue
);
flush_token_queue
(
stream
,
FALSE
);
free
(
stream
);
}
...
...
@@ -1205,8 +1206,11 @@ static ULONG WINAPI media_source_Release(IMFMediaSource *iface)
if
(
!
ref
)
{
IMFMediaSource_Shutdown
(
&
source
->
IMFMediaSource_iface
);
IMFMediaSource_Shutdown
(
iface
);
IMFPresentationDescriptor_Release
(
source
->
pres_desc
);
IMFMediaEventQueue_Release
(
source
->
event_queue
);
IMFByteStream_Release
(
source
->
byte_stream
);
wg_parser_destroy
(
source
->
wg_parser
);
free
(
source
);
}
...
...
@@ -1344,7 +1348,6 @@ static HRESULT WINAPI media_source_Pause(IMFMediaSource *iface)
static
HRESULT
WINAPI
media_source_Shutdown
(
IMFMediaSource
*
iface
)
{
struct
media_source
*
source
=
impl_from_IMFMediaSource
(
iface
);
unsigned
int
i
;
TRACE
(
"%p.
\n
"
,
iface
);
...
...
@@ -1359,26 +1362,16 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface)
WaitForSingleObject
(
source
->
read_thread
,
INFINITE
);
CloseHandle
(
source
->
read_thread
);
IMFPresentationDescriptor_Release
(
source
->
pres_desc
);
IMFMediaEventQueue_Shutdown
(
source
->
event_queue
);
IMFByteStream_Close
(
source
->
byte_stream
);
IMFByteStream_Release
(
source
->
byte_stream
);
for
(
i
=
0
;
i
<
source
->
stream_count
;
i
++
)
while
(
source
->
stream_count
--
)
{
struct
media_stream
*
stream
=
source
->
streams
[
i
];
struct
media_stream
*
stream
=
source
->
streams
[
source
->
stream_count
];
stream
->
state
=
STREAM_SHUTDOWN
;
IMFMediaEventQueue_Shutdown
(
stream
->
event_queue
);
IMFStreamDescriptor_Release
(
stream
->
descriptor
);
IMFMediaSource_Release
(
stream
->
media_source
);
IMFMediaStream_Release
(
&
stream
->
IMFMediaStream_iface
);
}
wg_parser_destroy
(
source
->
wg_parser
);
free
(
source
->
streams
);
MFUnlockWorkQueue
(
source
->
async_commands_queue
);
...
...
@@ -1565,17 +1558,14 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
IMFStreamDescriptor_Release
(
descriptors
[
i
]);
free
(
descriptors
);
}
for
(
i
=
0
;
i
<
object
->
stream_count
;
i
++
)
{
struct
media_stream
*
stream
=
object
->
streams
[
i
];
IMFMediaEventQueue_Release
(
stream
->
event_queue
);
IMFStreamDescriptor_Release
(
stream
->
descriptor
);
IMFMediaSource_Release
(
stream
->
media_source
);
free
(
stream
);
while
(
object
->
streams
&&
object
->
stream_count
--
)
{
struct
media_stream
*
stream
=
object
->
streams
[
object
->
stream_count
];
IMFMediaStream_Release
(
&
stream
->
IMFMediaStream_iface
);
}
free
(
object
->
streams
);
if
(
stream_count
!=
UINT_MAX
)
wg_parser_disconnect
(
object
->
wg_parser
);
if
(
object
->
read_thread
)
...
...
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