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
2062dd95
Commit
2062dd95
authored
Mar 11, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Block samplegrabber stream event calls after stream is removed.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
97f949b9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
samplegrabber.c
dlls/mf/samplegrabber.c
+13
-0
mf.c
dlls/mf/tests/mf.c
+0
-1
No files found.
dlls/mf/samplegrabber.c
View file @
2062dd95
...
...
@@ -235,6 +235,9 @@ static HRESULT WINAPI sample_grabber_stream_GetEvent(IMFStreamSink *iface, DWORD
TRACE
(
"%p, %#x, %p.
\n
"
,
iface
,
flags
,
event
);
if
(
!
stream
->
sink
)
return
MF_E_STREAMSINK_REMOVED
;
return
IMFMediaEventQueue_GetEvent
(
stream
->
event_queue
,
flags
,
event
);
}
...
...
@@ -245,6 +248,9 @@ static HRESULT WINAPI sample_grabber_stream_BeginGetEvent(IMFStreamSink *iface,
TRACE
(
"%p, %p, %p.
\n
"
,
iface
,
callback
,
state
);
if
(
!
stream
->
sink
)
return
MF_E_STREAMSINK_REMOVED
;
return
IMFMediaEventQueue_BeginGetEvent
(
stream
->
event_queue
,
callback
,
state
);
}
...
...
@@ -255,6 +261,9 @@ static HRESULT WINAPI sample_grabber_stream_EndGetEvent(IMFStreamSink *iface, IM
TRACE
(
"%p, %p, %p.
\n
"
,
iface
,
result
,
event
);
if
(
!
stream
->
sink
)
return
MF_E_STREAMSINK_REMOVED
;
return
IMFMediaEventQueue_EndGetEvent
(
stream
->
event_queue
,
result
,
event
);
}
...
...
@@ -265,6 +274,9 @@ static HRESULT WINAPI sample_grabber_stream_QueueEvent(IMFStreamSink *iface, Med
TRACE
(
"%p, %u, %s, %#x, %p.
\n
"
,
iface
,
event_type
,
debugstr_guid
(
ext_type
),
hr
,
value
);
if
(
!
stream
->
sink
)
return
MF_E_STREAMSINK_REMOVED
;
return
IMFMediaEventQueue_QueueEventParamVar
(
stream
->
event_queue
,
event_type
,
ext_type
,
hr
,
value
);
}
...
...
@@ -1046,6 +1058,7 @@ static HRESULT WINAPI sample_grabber_sink_Shutdown(IMFMediaSink *iface)
IMFMediaSink_Release
(
&
grabber
->
stream
->
sink
->
IMFMediaSink_iface
);
EnterCriticalSection
(
&
grabber
->
stream
->
cs
);
grabber
->
stream
->
sink
=
NULL
;
IMFMediaEventQueue_Shutdown
(
grabber
->
stream
->
event_queue
);
LeaveCriticalSection
(
&
grabber
->
stream
->
cs
);
IMFStreamSink_Release
(
&
grabber
->
stream
->
IMFStreamSink_iface
);
grabber
->
stream
=
NULL
;
...
...
dlls/mf/tests/mf.c
View file @
2062dd95
...
...
@@ -2162,7 +2162,6 @@ todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFStreamSink_GetEvent
(
stream
,
MF_EVENT_FLAG_NO_WAIT
,
&
event
);
todo_wine
ok
(
hr
==
MF_E_STREAMSINK_REMOVED
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFStreamSink_GetMediaSink
(
stream
,
&
sink2
);
...
...
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