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
fae575ce
Commit
fae575ce
authored
Jun 04, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfmediaengine: Fully initialize error state.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4d56ed9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
main.c
dlls/mfmediaengine/main.c
+10
-2
No files found.
dlls/mfmediaengine/main.c
View file @
fae575ce
...
...
@@ -85,6 +85,7 @@ struct media_engine
double
volume
;
double
duration
;
MF_MEDIA_ENGINE_ERR
error_code
;
HRESULT
extended_code
;
IMFMediaSession
*
session
;
IMFSourceResolver
*
resolver
;
CRITICAL_SECTION
cs
;
...
...
@@ -440,8 +441,12 @@ static HRESULT WINAPI media_engine_load_handler_Invoke(IMFAsyncCallback *iface,
}
if
(
FAILED
(
hr
))
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_ERROR
,
MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED
,
hr
);
{
engine
->
error_code
=
MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED
;
engine
->
extended_code
=
hr
;
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_ERROR
,
engine
->
error_code
,
engine
->
extended_code
);
}
LeaveCriticalSection
(
&
engine
->
cs
);
...
...
@@ -526,7 +531,10 @@ static HRESULT WINAPI media_engine_GetError(IMFMediaEngine *iface, IMFMediaError
else
if
(
engine
->
error_code
)
{
if
(
SUCCEEDED
(
hr
=
create_media_error
(
error
)))
{
IMFMediaError_SetErrorCode
(
*
error
,
engine
->
error_code
);
IMFMediaError_SetExtendedErrorCode
(
*
error
,
engine
->
extended_code
);
}
}
LeaveCriticalSection
(
&
engine
->
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