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
90696fe8
Commit
90696fe8
authored
Jun 27, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Uninitialize renderer before creating mixer and presenter.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
98c9aff0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
14 deletions
+22
-14
evr.c
dlls/mf/evr.c
+22
-14
No files found.
dlls/mf/evr.c
View file @
90696fe8
...
...
@@ -1702,11 +1702,8 @@ static HRESULT video_renderer_configure_presenter(struct video_renderer *rendere
return
hr
;
}
static
HRESULT
video_renderer_initialize
(
struct
video_renderer
*
renderer
,
IMFTransform
*
mixer
,
IMFVideoPresenter
*
presenter
)
static
void
video_renderer_uninitialize
(
struct
video_renderer
*
renderer
)
{
HRESULT
hr
;
video_renderer_release_services
(
renderer
);
if
(
renderer
->
mixer
)
...
...
@@ -1726,6 +1723,12 @@ static HRESULT video_renderer_initialize(struct video_renderer *renderer, IMFTra
IUnknown_Release
(
renderer
->
device_manager
);
renderer
->
device_manager
=
NULL
;
}
}
static
HRESULT
video_renderer_initialize
(
struct
video_renderer
*
renderer
,
IMFTransform
*
mixer
,
IMFVideoPresenter
*
presenter
)
{
HRESULT
hr
;
renderer
->
mixer
=
mixer
;
IMFTransform_AddRef
(
renderer
->
mixer
);
...
...
@@ -1747,11 +1750,22 @@ static HRESULT WINAPI video_renderer_InitializeRenderer(IMFVideoRenderer *iface,
TRACE
(
"%p, %p, %p.
\n
"
,
iface
,
mixer
,
presenter
);
EnterCriticalSection
(
&
renderer
->
cs
);
if
(
renderer
->
flags
&
EVR_SHUT_DOWN
)
{
LeaveCriticalSection
(
&
renderer
->
cs
);
return
MF_E_SHUTDOWN
;
}
video_renderer_uninitialize
(
renderer
);
if
(
mixer
)
IMFTransform_AddRef
(
mixer
);
else
if
(
FAILED
(
hr
=
video_renderer_create_mixer
(
NULL
,
&
mixer
)))
{
WARN
(
"Failed to create default mixer object, hr %#lx.
\n
"
,
hr
);
LeaveCriticalSection
(
&
renderer
->
cs
);
return
hr
;
}
...
...
@@ -1760,21 +1774,15 @@ static HRESULT WINAPI video_renderer_InitializeRenderer(IMFVideoRenderer *iface,
else
if
(
FAILED
(
hr
=
video_renderer_create_presenter
(
renderer
,
NULL
,
&
presenter
)))
{
WARN
(
"Failed to create default presenter, hr %#lx.
\n
"
,
hr
);
LeaveCriticalSection
(
&
renderer
->
cs
);
IMFTransform_Release
(
mixer
);
return
hr
;
}
EnterCriticalSection
(
&
renderer
->
cs
);
if
(
renderer
->
flags
&
EVR_SHUT_DOWN
)
hr
=
MF_E_SHUTDOWN
;
else
{
/* FIXME: check clock state */
/* FIXME: check that streams are not initialized */
/* FIXME: check clock state */
/* FIXME: check that streams are not initialized */
hr
=
video_renderer_initialize
(
renderer
,
mixer
,
presenter
);
}
hr
=
video_renderer_initialize
(
renderer
,
mixer
,
presenter
);
LeaveCriticalSection
(
&
renderer
->
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