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
ca2e2090
Commit
ca2e2090
authored
Mar 06, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Remove extra critical section from presentation descriptor.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7f114274
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
mediatype.c
dlls/mfplat/mediatype.c
+8
-11
No files found.
dlls/mfplat/mediatype.c
View file @
ca2e2090
...
...
@@ -58,7 +58,6 @@ struct presentation_desc
IMFPresentationDescriptor
IMFPresentationDescriptor_iface
;
struct
presentation_desc_entry
*
descriptors
;
unsigned
int
count
;
CRITICAL_SECTION
cs
;
};
static
HRESULT
presentation_descriptor_init
(
struct
presentation_desc
*
object
,
DWORD
count
);
...
...
@@ -1239,7 +1238,6 @@ static ULONG WINAPI presentation_descriptor_Release(IMFPresentationDescriptor *i
IMFStreamDescriptor_Release
(
presentation_desc
->
descriptors
[
i
].
descriptor
);
}
clear_attributes_object
(
&
presentation_desc
->
attributes
);
DeleteCriticalSection
(
&
presentation_desc
->
cs
);
heap_free
(
presentation_desc
->
descriptors
);
heap_free
(
presentation_desc
);
}
...
...
@@ -1553,9 +1551,9 @@ static HRESULT WINAPI presentation_descriptor_GetStreamDescriptorByIndex(IMFPres
if
(
index
>=
presentation_desc
->
count
)
return
E_INVALIDARG
;
EnterCriticalSection
(
&
presentation_desc
->
cs
);
EnterCriticalSection
(
&
presentation_desc
->
attributes
.
cs
);
*
selected
=
presentation_desc
->
descriptors
[
index
].
selected
;
LeaveCriticalSection
(
&
presentation_desc
->
cs
);
LeaveCriticalSection
(
&
presentation_desc
->
attributes
.
cs
);
*
descriptor
=
presentation_desc
->
descriptors
[
index
].
descriptor
;
IMFStreamDescriptor_AddRef
(
*
descriptor
);
...
...
@@ -1572,9 +1570,9 @@ static HRESULT WINAPI presentation_descriptor_SelectStream(IMFPresentationDescri
if
(
index
>=
presentation_desc
->
count
)
return
E_INVALIDARG
;
EnterCriticalSection
(
&
presentation_desc
->
cs
);
EnterCriticalSection
(
&
presentation_desc
->
attributes
.
cs
);
presentation_desc
->
descriptors
[
index
].
selected
=
TRUE
;
LeaveCriticalSection
(
&
presentation_desc
->
cs
);
LeaveCriticalSection
(
&
presentation_desc
->
attributes
.
cs
);
return
S_OK
;
}
...
...
@@ -1588,9 +1586,9 @@ static HRESULT WINAPI presentation_descriptor_DeselectStream(IMFPresentationDesc
if
(
index
>=
presentation_desc
->
count
)
return
E_INVALIDARG
;
EnterCriticalSection
(
&
presentation_desc
->
cs
);
EnterCriticalSection
(
&
presentation_desc
->
attributes
.
cs
);
presentation_desc
->
descriptors
[
index
].
selected
=
FALSE
;
LeaveCriticalSection
(
&
presentation_desc
->
cs
);
LeaveCriticalSection
(
&
presentation_desc
->
attributes
.
cs
);
return
S_OK
;
}
...
...
@@ -1610,7 +1608,7 @@ static HRESULT WINAPI presentation_descriptor_Clone(IMFPresentationDescriptor *i
presentation_descriptor_init
(
object
,
presentation_desc
->
count
);
EnterCriticalSection
(
&
presentation_desc
->
cs
);
EnterCriticalSection
(
&
presentation_desc
->
attributes
.
cs
);
for
(
i
=
0
;
i
<
presentation_desc
->
count
;
++
i
)
{
...
...
@@ -1620,7 +1618,7 @@ static HRESULT WINAPI presentation_descriptor_Clone(IMFPresentationDescriptor *i
attributes_CopyAllItems
(
&
presentation_desc
->
attributes
,
(
IMFAttributes
*
)
&
object
->
IMFPresentationDescriptor_iface
);
LeaveCriticalSection
(
&
presentation_desc
->
cs
);
LeaveCriticalSection
(
&
presentation_desc
->
attributes
.
cs
);
*
descriptor
=
&
object
->
IMFPresentationDescriptor_iface
;
...
...
@@ -1677,7 +1675,6 @@ static HRESULT presentation_descriptor_init(struct presentation_desc *object, DW
return
hr
;
object
->
IMFPresentationDescriptor_iface
.
lpVtbl
=
&
presentationdescriptorvtbl
;
object
->
descriptors
=
heap_alloc_zero
(
count
*
sizeof
(
*
object
->
descriptors
));
InitializeCriticalSection
(
&
object
->
cs
);
if
(
!
object
->
descriptors
)
{
IMFPresentationDescriptor_Release
(
&
object
->
IMFPresentationDescriptor_iface
);
...
...
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