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
75a5263c
Commit
75a5263c
authored
Mar 07, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/tests: Test that MFCreateMFVideoFormatFromMFMediaType appends user data.
parent
7598556b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
+29
-2
mfplat.c
dlls/mfplat/tests/mfplat.c
+29
-2
No files found.
dlls/mfplat/tests/mfplat.c
View file @
75a5263c
...
...
@@ -7120,16 +7120,43 @@ static void test_MFCreateMFVideoFormatFromMFMediaType(void)
{
MFVIDEOFORMAT
*
video_format
;
IMFMediaType
*
media_type
;
UINT32
size
;
UINT32
size
,
expect_size
;
PALETTEENTRY
palette
[
64
];
BYTE
codec_data
[
32
];
HRESULT
hr
;
hr
=
MFCreateMediaType
(
&
media_type
);
ok
(
hr
==
S_OK
,
"Failed to create media type, hr %#lx.
\n
"
,
hr
);
expect_size
=
sizeof
(
*
video_format
);
hr
=
MFCreateMFVideoFormatFromMFMediaType
(
media_type
,
&
video_format
,
&
size
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!
video_format
,
"Unexpected format.
\n
"
);
ok
(
size
==
expect_size
,
"Unexpected size %u.
\n
"
,
size
);
ok
(
video_format
->
dwSize
==
size
,
"Unexpected size %u.
\n
"
,
size
);
CoTaskMemFree
(
video_format
);
memset
(
palette
,
0xa5
,
sizeof
(
palette
));
expect_size
=
offsetof
(
MFVIDEOFORMAT
,
surfaceInfo
.
Palette
[
ARRAY_SIZE
(
palette
)
+
1
]);
hr
=
IMFMediaType_SetBlob
(
media_type
,
&
MF_MT_PALETTE
,
(
BYTE
*
)
palette
,
sizeof
(
palette
));
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFCreateMFVideoFormatFromMFMediaType
(
media_type
,
&
video_format
,
&
size
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!
video_format
,
"Unexpected format.
\n
"
);
todo_wine
ok
(
size
==
expect_size
,
"Unexpected size %u.
\n
"
,
size
);
ok
(
video_format
->
dwSize
==
size
,
"Unexpected size %u.
\n
"
,
size
);
CoTaskMemFree
(
video_format
);
memset
(
codec_data
,
0xcd
,
sizeof
(
codec_data
));
expect_size
+=
sizeof
(
codec_data
);
hr
=
IMFMediaType_SetBlob
(
media_type
,
&
MF_MT_USER_DATA
,
codec_data
,
sizeof
(
codec_data
));
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFCreateMFVideoFormatFromMFMediaType
(
media_type
,
&
video_format
,
&
size
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!
video_format
,
"Unexpected format.
\n
"
);
ok
(
video_format
->
dwSize
==
size
&&
size
==
sizeof
(
*
video_format
),
"Unexpected size %u.
\n
"
,
size
);
todo_wine
ok
(
size
==
expect_size
,
"Unexpected size %u.
\n
"
,
size
);
ok
(
video_format
->
dwSize
==
size
,
"Unexpected size %u.
\n
"
,
size
);
CoTaskMemFree
(
video_format
);
IMFMediaType_Release
(
media_type
);
...
...
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