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
ad4c734c
Commit
ad4c734c
authored
Feb 18, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Fix media type compare logic regarding user data.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d38bd69b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
mediatype.c
dlls/mfplat/mediatype.c
+4
-3
mfplat.c
dlls/mfplat/tests/mfplat.c
+13
-0
No files found.
dlls/mfplat/mediatype.c
View file @
ad4c734c
...
...
@@ -514,13 +514,14 @@ static HRESULT WINAPI mediatype_IsEqual(IMFMediaType *iface, IMFMediaType *type,
PropVariantInit
(
&
right
.
value
);
right
.
hr
=
IMFAttributes_GetItem
(
right
.
type
,
&
MF_MT_USER_DATA
,
&
right
.
value
);
if
(
SUCCEEDED
(
left
.
hr
)
&&
SUCCEEDED
(
left
.
hr
))
/* Compare user data if both types have it, otherwise simply check if both don't. */
if
(
SUCCEEDED
(
left
.
hr
)
&&
SUCCEEDED
(
right
.
hr
))
{
result
=
FALSE
;
IMFAttributes_CompareItem
(
left
.
type
,
&
MF_MT_USER_DATA
,
&
left
.
value
,
&
result
);
}
else
if
(
FAILED
(
left
.
hr
)
&&
FAILED
(
left
.
hr
))
result
=
TRUE
;
else
result
=
FAILED
(
left
.
hr
)
&&
FAILED
(
right
.
hr
)
;
PropVariantClear
(
&
left
.
value
);
PropVariantClear
(
&
right
.
value
);
...
...
dlls/mfplat/tests/mfplat.c
View file @
ad4c734c
...
...
@@ -762,6 +762,19 @@ if(0)
ok
(
flags
==
(
MF_MEDIATYPE_EQUAL_MAJOR_TYPES
|
MF_MEDIATYPE_EQUAL_FORMAT_TYPES
|
MF_MEDIATYPE_EQUAL_FORMAT_DATA
|
MF_MEDIATYPE_EQUAL_FORMAT_USER_DATA
),
"Unexpected flags %#x.
\n
"
,
flags
);
/* Different user data. */
hr
=
IMFMediaType_SetBlob
(
mediatype
,
&
MF_MT_USER_DATA
,
(
const
UINT8
*
)
&
flags
,
sizeof
(
flags
));
ok
(
hr
==
S_OK
,
"Failed to set attribute, hr %#x.
\n
"
,
hr
);
flags
=
0
;
hr
=
IMFMediaType_IsEqual
(
mediatype
,
mediatype2
,
&
flags
);
ok
(
hr
==
S_FALSE
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
flags
==
(
MF_MEDIATYPE_EQUAL_MAJOR_TYPES
|
MF_MEDIATYPE_EQUAL_FORMAT_TYPES
|
MF_MEDIATYPE_EQUAL_FORMAT_DATA
),
"Unexpected flags %#x.
\n
"
,
flags
);
hr
=
IMFMediaType_DeleteItem
(
mediatype
,
&
MF_MT_USER_DATA
);
ok
(
hr
==
S_OK
,
"Failed to delete item, hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaType_SetGUID
(
mediatype
,
&
MF_MT_SUBTYPE
,
&
MFVideoFormat_RGB32
);
ok
(
hr
==
S_OK
,
"Failed to set subtype, hr %#x.
\n
"
,
hr
);
...
...
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