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
16d975fc
Commit
16d975fc
authored
Sep 16, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Avoid clearing media session command list while it is running.
This fixes a random crash with mfmediaengine tests, which quickly starts then shuts down a media session.
parent
953b9373
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
session.c
dlls/mf/session.c
+10
-2
No files found.
dlls/mf/session.c
View file @
16d975fc
...
...
@@ -47,6 +47,7 @@ enum session_command
SESSION_CMD_PAUSE
,
SESSION_CMD_STOP
,
SESSION_CMD_SET_RATE
,
SESSION_CMD_SHUTDOWN
,
};
struct
session_op
...
...
@@ -460,7 +461,10 @@ static HRESULT session_submit_command(struct media_session *session, struct sess
{
if
(
list_empty
(
&
session
->
commands
)
&&
!
(
session
->
presentation
.
flags
&
SESSION_FLAG_PENDING_COMMAND
))
hr
=
MFPutWorkItem
(
MFASYNC_CALLBACK_QUEUE_STANDARD
,
&
session
->
commands_callback
,
&
op
->
IUnknown_iface
);
list_add_tail
(
&
session
->
commands
,
&
op
->
entry
);
if
(
op
->
command
==
SESSION_CMD_SHUTDOWN
)
list_add_head
(
&
session
->
commands
,
&
op
->
entry
);
else
list_add_tail
(
&
session
->
commands
,
&
op
->
entry
);
IUnknown_AddRef
(
&
op
->
IUnknown_iface
);
}
LeaveCriticalSection
(
&
session
->
cs
);
...
...
@@ -2041,7 +2045,7 @@ static HRESULT WINAPI mfsession_Shutdown(IMFMediaSession *iface)
IMFPresentationClock_Release
(
session
->
clock
);
session
->
clock
=
NULL
;
session_clear_presentation
(
session
);
session_
clear_command_list
(
session
);
session_
submit_simple_command
(
session
,
SESSION_CMD_SHUTDOWN
);
}
LeaveCriticalSection
(
&
session
->
cs
);
...
...
@@ -2383,6 +2387,10 @@ static HRESULT WINAPI session_commands_callback_Invoke(IMFAsyncCallback *iface,
case
SESSION_CMD_SET_RATE
:
session_set_rate
(
session
,
op
->
set_rate
.
thin
,
op
->
set_rate
.
rate
);
break
;
case
SESSION_CMD_SHUTDOWN
:
session_clear_command_list
(
session
);
session_command_complete
(
session
);
break
;
default:
;
}
...
...
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