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
9ec297e2
Commit
9ec297e2
authored
Feb 04, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/tests: Fix a crash on Vista.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3b3dfda5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
15 deletions
+21
-15
mfplat.c
dlls/mfplat/tests/mfplat.c
+21
-15
No files found.
dlls/mfplat/tests/mfplat.c
View file @
9ec297e2
...
...
@@ -136,6 +136,7 @@ static DXGI_FORMAT (WINAPI *pMFMapDX9FormatToDXGIFormat)(DWORD format);
static
HRESULT
(
WINAPI
*
pMFCreateVideoSampleAllocatorEx
)(
REFIID
riid
,
void
**
allocator
);
static
HRESULT
(
WINAPI
*
pMFCreateDXGISurfaceBuffer
)(
REFIID
riid
,
IUnknown
*
surface
,
UINT
subresource
,
BOOL
bottomup
,
IMFMediaBuffer
**
buffer
);
static
HRESULT
(
WINAPI
*
pMFCreateVideoMediaTypeFromSubtype
)(
const
GUID
*
subtype
,
IMFVideoMediaType
**
media_type
);
static
HWND
create_window
(
void
)
{
...
...
@@ -799,6 +800,7 @@ static void init_functions(void)
X
(
MFCreateMFByteStreamOnStream
);
X
(
MFCreateTrackedSample
);
X
(
MFCreateTransformActivate
);
X
(
MFCreateVideoMediaTypeFromSubtype
);
X
(
MFCreateVideoSampleAllocatorEx
);
X
(
MFGetPlaneSize
);
X
(
MFGetStrideForBitmapInfoHeader
);
...
...
@@ -965,28 +967,32 @@ if(0)
IUnknown_Release
(
unk2
);
IUnknown_Release
(
unk
);
IMFMediaType_Release
(
mediatype
);
hr
=
MFCreateVideoMediaTypeFromSubtype
(
&
MFVideoFormat_RGB555
,
&
video_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
check_interface
(
video_type
,
&
IID_IMFMediaType
,
TRUE
);
check_interface
(
video_type
,
&
IID_IMFVideoMediaType
,
TRUE
);
if
(
pMFCreateVideoMediaTypeFromSubtype
)
{
hr
=
pMFCreateVideoMediaTypeFromSubtype
(
&
MFVideoFormat_RGB555
,
&
video_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
/* Major and subtype are set on creation. */
hr
=
IMFVideoMediaType_GetCount
(
video_type
,
&
count
);
ok
(
count
==
2
,
"Unexpected attribute count %#x.
\n
"
,
hr
);
check_interface
(
video_type
,
&
IID_IMFMediaType
,
TRUE
);
check_interface
(
video_type
,
&
IID_IMFVideoMediaType
,
TRUE
);
hr
=
IMFVideoMediaType_DeleteAllItems
(
video_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
/* Major and subtype are set on creation. */
hr
=
IMFVideoMediaType_GetCount
(
video_type
,
&
count
);
ok
(
count
==
2
,
"Unexpected attribute count %#x.
\n
"
,
hr
);
hr
=
IMFVideoMediaType_GetCount
(
video_type
,
&
count
);
ok
(
!
count
,
"Unexpected attribute count
%#x.
\n
"
,
hr
);
hr
=
IMFVideoMediaType_DeleteAllItems
(
video_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr
%#x.
\n
"
,
hr
);
check_interface
(
video_type
,
&
IID_IMFVideoMediaType
,
FALSE
);
hr
=
IMFVideoMediaType_GetCount
(
video_type
,
&
count
);
ok
(
!
count
,
"Unexpected attribute count %#x.
\n
"
,
hr
);
IMFVideoMediaType_Release
(
video_type
);
check_interface
(
video_type
,
&
IID_IMFVideoMediaType
,
FALSE
);
IMFMediaType_Release
(
mediatype
);
IMFVideoMediaType_Release
(
video_type
);
}
else
win_skip
(
"MFCreateVideoMediaTypeFromSubtype() is not available.
\n
"
);
/* IMFAudioMediaType */
hr
=
MFCreateMediaType
(
&
mediatype
);
...
...
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