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
882d8229
Commit
882d8229
authored
Oct 31, 2023
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/samplegrabber: Check shutdown state when setting the clock.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
c45ae2c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
samplegrabber.c
dlls/mf/samplegrabber.c
+5
-1
mf.c
dlls/mf/tests/mf.c
+10
-3
No files found.
dlls/mf/samplegrabber.c
View file @
882d8229
...
@@ -1054,7 +1054,11 @@ static HRESULT WINAPI sample_grabber_sink_SetPresentationClock(IMFMediaSink *ifa
...
@@ -1054,7 +1054,11 @@ static HRESULT WINAPI sample_grabber_sink_SetPresentationClock(IMFMediaSink *ifa
EnterCriticalSection
(
&
grabber
->
cs
);
EnterCriticalSection
(
&
grabber
->
cs
);
if
(
SUCCEEDED
(
hr
=
IMFSampleGrabberSinkCallback_OnSetPresentationClock
(
sample_grabber_get_callback
(
grabber
),
if
(
grabber
->
is_shut_down
)
{
hr
=
MF_E_SHUTDOWN
;
}
else
if
(
SUCCEEDED
(
hr
=
IMFSampleGrabberSinkCallback_OnSetPresentationClock
(
sample_grabber_get_callback
(
grabber
),
clock
)))
clock
)))
{
{
sample_grabber_set_presentation_clock
(
grabber
,
clock
);
sample_grabber_set_presentation_clock
(
grabber
,
clock
);
...
...
dlls/mf/tests/mf.c
View file @
882d8229
...
@@ -4649,9 +4649,16 @@ static void test_sample_grabber(void)
...
@@ -4649,9 +4649,16 @@ static void test_sample_grabber(void)
EXPECT_REF
(
clock
,
3
);
EXPECT_REF
(
clock
,
3
);
hr
=
IMFMediaSink_Shutdown
(
sink
);
hr
=
IMFMediaSink_Shutdown
(
sink
);
ok
(
hr
==
S_OK
,
"Failed to shut down, hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to shut down, hr %#lx.
\n
"
,
hr
);
EXPECT_REF
(
clock
,
1
);
hr
=
IMFMediaSink_SetPresentationClock
(
sink
,
NULL
);
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaSink_SetPresentationClock
(
sink
,
clock
);
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ref
=
IMFPresentationClock_Release
(
clock
);
ref
=
IMFPresentationClock_Release
(
clock
);
ok
(
ref
==
0
,
"Release returned %ld
\n
"
,
ref
);
ok
(
!
ref
,
"Unexpected refcount %ld.
\n
"
,
ref
);
hr
=
IMFMediaEventGenerator_GetEvent
(
eg
,
MF_EVENT_FLAG_NO_WAIT
,
&
event
);
hr
=
IMFMediaEventGenerator_GetEvent
(
eg
,
MF_EVENT_FLAG_NO_WAIT
,
&
event
);
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#lx.
\n
"
,
hr
);
...
@@ -4730,9 +4737,9 @@ static void test_sample_grabber(void)
...
@@ -4730,9 +4737,9 @@ static void test_sample_grabber(void)
IMFStreamSink_Release
(
stream
);
IMFStreamSink_Release
(
stream
);
ref
=
IMFActivate_Release
(
activate
);
ref
=
IMFActivate_Release
(
activate
);
ok
(
ref
==
0
,
"Release returned %ld
\n
"
,
ref
);
ok
(
!
ref
,
"Unexpected refcount %ld.
\n
"
,
ref
);
ref
=
IMFMediaSink_Release
(
sink
);
ref
=
IMFMediaSink_Release
(
sink
);
ok
(
ref
==
0
,
"Release returned %ld
\n
"
,
ref
);
ok
(
!
ref
,
"Unexpected refcount %ld.
\n
"
,
ref
);
/* Rateless mode with MF_SAMPLEGRABBERSINK_IGNORE_CLOCK. */
/* Rateless mode with MF_SAMPLEGRABBERSINK_IGNORE_CLOCK. */
hr
=
MFCreateMediaType
(
&
media_type
);
hr
=
MFCreateMediaType
(
&
media_type
);
...
...
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