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
04547b42
Commit
04547b42
authored
Jul 20, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfmediaengine: Handle shutdown state in SetSource().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
176da9a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
21 deletions
+26
-21
main.c
dlls/mfmediaengine/main.c
+26
-20
mfmediaengine.c
dlls/mfmediaengine/tests/mfmediaengine.c
+0
-1
No files found.
dlls/mfmediaengine/main.c
View file @
04547b42
...
...
@@ -1352,29 +1352,35 @@ static HRESULT WINAPI media_engine_SetSource(IMFMediaEngine *iface, BSTR url)
EnterCriticalSection
(
&
engine
->
cs
);
SysFreeString
(
engine
->
current_source
);
engine
->
current_source
=
NULL
;
if
(
url
)
engine
->
current_source
=
SysAllocString
(
url
);
engine
->
ready_state
=
MF_MEDIA_ENGINE_READY_HAVE_NOTHING
;
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS
,
0
,
0
);
if
(
url
)
if
(
engine
->
flags
&
FLAGS_ENGINE_SHUT_DOWN
)
hr
=
MF_E_SHUTDOWN
;
else
{
IPropertyStore
*
props
=
NULL
;
unsigned
int
flags
;
SysFreeString
(
engine
->
current_source
);
engine
->
current_source
=
NULL
;
if
(
url
)
engine
->
current_source
=
SysAllocString
(
url
);
engine
->
ready_state
=
MF_MEDIA_ENGINE_READY_HAVE_NOTHING
;
flags
=
MF_RESOLUTION_MEDIASOURCE
;
if
(
engine
->
flags
&
MF_MEDIA_ENGINE_DISABLE_LOCAL_PLUGINS
)
flags
|=
MF_RESOLUTION_DISABLE_LOCAL_PLUGINS
;
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS
,
0
,
0
);
IMFAttributes_GetUnknown
(
engine
->
attributes
,
&
MF_MEDIA_ENGINE_SOURCE_RESOLVER_CONFIG_STORE
,
&
IID_IPropertyStore
,
(
void
**
)
&
props
);
hr
=
IMFSourceResolver_BeginCreateObjectFromURL
(
engine
->
resolver
,
url
,
flags
,
props
,
NULL
,
&
engine
->
load_handler
,
NULL
);
if
(
props
)
IPropertyStore_Release
(
props
);
if
(
url
)
{
IPropertyStore
*
props
=
NULL
;
unsigned
int
flags
;
flags
=
MF_RESOLUTION_MEDIASOURCE
;
if
(
engine
->
flags
&
MF_MEDIA_ENGINE_DISABLE_LOCAL_PLUGINS
)
flags
|=
MF_RESOLUTION_DISABLE_LOCAL_PLUGINS
;
IMFAttributes_GetUnknown
(
engine
->
attributes
,
&
MF_MEDIA_ENGINE_SOURCE_RESOLVER_CONFIG_STORE
,
&
IID_IPropertyStore
,
(
void
**
)
&
props
);
hr
=
IMFSourceResolver_BeginCreateObjectFromURL
(
engine
->
resolver
,
url
,
flags
,
props
,
NULL
,
&
engine
->
load_handler
,
NULL
);
if
(
props
)
IPropertyStore_Release
(
props
);
}
}
LeaveCriticalSection
(
&
engine
->
cs
);
...
...
dlls/mfmediaengine/tests/mfmediaengine.c
View file @
04547b42
...
...
@@ -253,7 +253,6 @@ static void test_Shutdown(void)
ok
(
hr
==
MF_E_SHUTDOWN
||
broken
(
hr
==
S_OK
)
/* before win10 */
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaEngine_SetSource
(
media_engine
,
NULL
);
todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaEngine_GetCurrentSource
(
media_engine
,
&
str
);
...
...
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