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
51dcfe46
Commit
51dcfe46
authored
May 15, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/samglegrabber: Dump pending items on shutdown.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b9ec2719
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
samplegrabber.c
dlls/mf/samplegrabber.c
+12
-5
No files found.
dlls/mf/samplegrabber.c
View file @
51dcfe46
...
...
@@ -802,11 +802,20 @@ static ULONG WINAPI sample_grabber_sink_AddRef(IMFMediaSink *iface)
return
refcount
;
}
static
void
sample_grabber_release_pending_items
(
struct
sample_grabber
*
grabber
)
{
struct
scheduled_item
*
item
,
*
next_item
;
LIST_FOR_EACH_ENTRY_SAFE
(
item
,
next_item
,
&
grabber
->
items
,
struct
scheduled_item
,
entry
)
{
stream_release_pending_item
(
item
);
}
}
static
ULONG
WINAPI
sample_grabber_sink_Release
(
IMFMediaSink
*
iface
)
{
struct
sample_grabber
*
grabber
=
impl_from_IMFMediaSink
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
grabber
->
refcount
);
struct
scheduled_item
*
item
,
*
next_item
;
TRACE
(
"%p, refcount %u.
\n
"
,
iface
,
refcount
);
...
...
@@ -836,10 +845,7 @@ static ULONG WINAPI sample_grabber_sink_Release(IMFMediaSink *iface)
}
if
(
grabber
->
sample_attributes
)
IMFAttributes_Release
(
grabber
->
sample_attributes
);
LIST_FOR_EACH_ENTRY_SAFE
(
item
,
next_item
,
&
grabber
->
items
,
struct
scheduled_item
,
entry
)
{
stream_release_pending_item
(
item
);
}
sample_grabber_release_pending_items
(
grabber
);
DeleteCriticalSection
(
&
grabber
->
cs
);
heap_free
(
grabber
);
}
...
...
@@ -1031,6 +1037,7 @@ static HRESULT WINAPI sample_grabber_sink_Shutdown(IMFMediaSink *iface)
EnterCriticalSection
(
&
grabber
->
cs
);
grabber
->
is_shut_down
=
TRUE
;
sample_grabber_release_pending_items
(
grabber
);
if
(
SUCCEEDED
(
hr
=
IMFSampleGrabberSinkCallback_OnShutdown
(
sample_grabber_get_callback
(
grabber
))))
{
sample_grabber_set_presentation_clock
(
grabber
,
NULL
);
...
...
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