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
dda9037c
Commit
dda9037c
authored
Apr 30, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Copy attributes when cloning presentation descriptor.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fe0f8a15
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
mediatype.c
dlls/mfplat/mediatype.c
+2
-1
mfplat.c
dlls/mfplat/tests/mfplat.c
+11
-0
No files found.
dlls/mfplat/mediatype.c
View file @
dda9037c
...
...
@@ -1616,7 +1616,8 @@ static HRESULT WINAPI presentation_descriptor_Clone(IMFPresentationDescriptor *i
object
->
descriptors
[
i
]
=
presentation_desc
->
descriptors
[
i
];
IMFStreamDescriptor_AddRef
(
object
->
descriptors
[
i
].
descriptor
);
}
/* FIXME: copy attributes */
attributes_CopyAllItems
(
&
presentation_desc
->
attributes
,
(
IMFAttributes
*
)
&
object
->
IMFPresentationDescriptor_iface
);
LeaveCriticalSection
(
&
presentation_desc
->
cs
);
...
...
dlls/mfplat/tests/mfplat.c
View file @
dda9037c
...
...
@@ -2289,6 +2289,7 @@ static void test_presentation_descriptor(void)
IMFMediaType
*
media_type
;
unsigned
int
i
;
BOOL
selected
;
UINT64
value
;
DWORD
count
;
HRESULT
hr
;
...
...
@@ -2330,14 +2331,24 @@ static void test_presentation_descriptor(void)
ok
(
!!
selected
,
"Unexpected selected state.
\n
"
);
IMFStreamDescriptor_Release
(
stream_desc2
);
hr
=
IMFPresentationDescriptor_SetUINT64
(
pd
,
&
MF_PD_TOTAL_FILE_SIZE
,
1
);
ok
(
hr
==
S_OK
,
"Failed to set attribute, hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationDescriptor_Clone
(
pd
,
&
pd2
);
ok
(
hr
==
S_OK
,
"Failed to clone, hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationDescriptor_GetStreamDescriptorByIndex
(
pd2
,
0
,
&
selected
,
&
stream_desc2
);
ok
(
hr
==
S_OK
,
"Failed to get stream descriptor, hr %#x.
\n
"
,
hr
);
ok
(
!!
selected
,
"Unexpected selected state.
\n
"
);
ok
(
stream_desc2
==
stream_desc
[
0
],
"Unexpected stream descriptor.
\n
"
);
IMFStreamDescriptor_Release
(
stream_desc2
);
value
=
0
;
hr
=
IMFPresentationDescriptor_GetUINT64
(
pd2
,
&
MF_PD_TOTAL_FILE_SIZE
,
&
value
);
ok
(
hr
==
S_OK
,
"Failed to get attribute, hr %#x.
\n
"
,
hr
);
ok
(
value
==
1
,
"Unexpected attribute value.
\n
"
);
IMFPresentationDescriptor_Release
(
pd2
);
IMFPresentationDescriptor_Release
(
pd
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
stream_desc
);
++
i
)
...
...
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