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
cba7616d
Commit
cba7616d
authored
Jun 23, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/session: Send failed event when clearing topologies from closed state.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8cdfa5bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
session.c
dlls/mf/session.c
+17
-6
No files found.
dlls/mf/session.c
View file @
cba7616d
...
...
@@ -502,7 +502,7 @@ static HRESULT session_submit_simple_command(struct media_session *session, enum
return
hr
;
}
static
void
session_clear_topologies
(
struct
media_session
*
session
)
static
void
session_clear_
queued_
topologies
(
struct
media_session
*
session
)
{
struct
queued_topology
*
ptr
,
*
next
;
...
...
@@ -1055,10 +1055,24 @@ static void session_close(struct media_session *session)
break
;
}
session_clear_queued_topologies
(
session
);
if
(
FAILED
(
hr
))
session_set_closed
(
session
,
hr
);
}
static
void
session_clear_topologies
(
struct
media_session
*
session
)
{
HRESULT
hr
=
S_OK
;
if
(
session
->
state
==
SESSION_STATE_CLOSED
)
hr
=
MF_E_INVALIDREQUEST
;
else
session_clear_queued_topologies
(
session
);
IMFMediaEventQueue_QueueEventParamVar
(
session
->
event_queue
,
MESessionTopologiesCleared
,
&
GUID_NULL
,
hr
,
NULL
);
session_command_complete
(
session
);
}
static
struct
media_source
*
session_get_media_source
(
struct
media_session
*
session
,
IMFMediaSource
*
source
)
{
struct
media_source
*
cur
;
...
...
@@ -1561,7 +1575,7 @@ static void session_set_topology(struct media_session *session, DWORD flags, IMF
}
else
if
(
topology
&&
flags
&
MFSESSION_SETTOPOLOGY_IMMEDIATE
)
{
session_clear_topologies
(
session
);
session_clear_
queued_
topologies
(
session
);
session_clear_presentation
(
session
);
}
...
...
@@ -1636,7 +1650,7 @@ static ULONG WINAPI mfsession_Release(IMFMediaSession *iface)
if
(
!
refcount
)
{
session_clear_topologies
(
session
);
session_clear_
queued_
topologies
(
session
);
session_clear_presentation
(
session
);
session_clear_command_list
(
session
);
if
(
session
->
presentation
.
current_topology
)
...
...
@@ -2079,9 +2093,6 @@ static HRESULT WINAPI session_commands_callback_Invoke(IMFAsyncCallback *iface,
{
case
SESSION_CMD_CLEAR_TOPOLOGIES
:
session_clear_topologies
(
session
);
IMFMediaEventQueue_QueueEventParamVar
(
session
->
event_queue
,
MESessionTopologiesCleared
,
&
GUID_NULL
,
S_OK
,
NULL
);
session_command_complete
(
session
);
break
;
case
SESSION_CMD_SET_TOPOLOGY
:
session_set_topology
(
session
,
op
->
u
.
set_topology
.
flags
,
op
->
u
.
set_topology
.
topology
);
...
...
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