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
d063fff6
Commit
d063fff6
authored
Oct 23, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Add default attributes for sample copier.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
267b365f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
main.c
dlls/mf/main.c
+14
-2
mf.c
dlls/mf/tests/mf.c
+13
-2
No files found.
dlls/mf/main.c
View file @
d063fff6
...
...
@@ -1523,7 +1523,8 @@ static ULONG WINAPI sample_copier_transform_Release(IMFTransform *iface)
if
(
!
refcount
)
{
IMFAttributes_Release
(
transform
->
attributes
);
if
(
transform
->
attributes
)
IMFAttributes_Release
(
transform
->
attributes
);
if
(
transform
->
buffer_type
)
IMFMediaType_Release
(
transform
->
buffer_type
);
DeleteCriticalSection
(
&
transform
->
cs
);
...
...
@@ -1999,6 +2000,7 @@ static const IMFTransformVtbl sample_copier_transform_vtbl =
HRESULT
WINAPI
MFCreateSampleCopierMFT
(
IMFTransform
**
transform
)
{
struct
sample_copier
*
object
;
HRESULT
hr
;
TRACE
(
"%p.
\n
"
,
transform
);
...
...
@@ -2008,10 +2010,20 @@ HRESULT WINAPI MFCreateSampleCopierMFT(IMFTransform **transform)
object
->
IMFTransform_iface
.
lpVtbl
=
&
sample_copier_transform_vtbl
;
object
->
refcount
=
1
;
MFCreateAttributes
(
&
object
->
attributes
,
0
);
InitializeCriticalSection
(
&
object
->
cs
);
if
(
FAILED
(
hr
=
MFCreateAttributes
(
&
object
->
attributes
,
0
)))
goto
failed
;
IMFAttributes_SetUINT32
(
object
->
attributes
,
&
MFT_SUPPORT_DYNAMIC_FORMAT_CHANGE
,
1
);
*
transform
=
&
object
->
IMFTransform_iface
;
return
S_OK
;
failed:
IMFTransform_Release
(
&
object
->
IMFTransform_iface
);
return
hr
;
}
dlls/mf/tests/mf.c
View file @
d063fff6
...
...
@@ -3660,6 +3660,7 @@ static BOOL is_sample_copier_available_type(IMFMediaType *type)
static
void
test_sample_copier
(
void
)
{
IMFAttributes
*
attributes
,
*
attributes2
;
DWORD
in_min
,
in_max
,
out_min
,
out_max
;
IMFMediaType
*
mediatype
,
*
mediatype2
;
MFT_OUTPUT_STREAM_INFO
output_info
;
...
...
@@ -3668,9 +3669,9 @@ static void test_sample_copier(void)
DWORD
input_count
,
output_count
;
MFT_OUTPUT_DATA_BUFFER
buffer
;
IMFMediaBuffer
*
media_buffer
;
IMFAttributes
*
attribute
s
;
DWORD
count
,
flags
,
statu
s
;
IMFTransform
*
copier
;
DWORD
flags
,
status
;
UINT32
value
;
HRESULT
hr
;
hr
=
MFCreateSampleCopierMFT
(
&
copier
);
...
...
@@ -3678,6 +3679,16 @@ static void test_sample_copier(void)
hr
=
IMFTransform_GetAttributes
(
copier
,
&
attributes
);
ok
(
hr
==
S_OK
,
"Failed to get transform attributes, hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_GetAttributes
(
copier
,
&
attributes2
);
ok
(
hr
==
S_OK
,
"Failed to get transform attributes, hr %#x.
\n
"
,
hr
);
ok
(
attributes
==
attributes2
,
"Unexpected instance.
\n
"
);
IMFAttributes_Release
(
attributes2
);
hr
=
IMFAttributes_GetCount
(
attributes
,
&
count
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
count
==
1
,
"Unexpected attribute count %u.
\n
"
,
count
);
hr
=
IMFAttributes_GetUINT32
(
attributes
,
&
MFT_SUPPORT_DYNAMIC_FORMAT_CHANGE
,
&
value
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
!!
value
,
"Unexpected value %u.
\n
"
,
value
);
IMFAttributes_Release
(
attributes
);
hr
=
IMFTransform_GetInputStreamAttributes
(
copier
,
0
,
&
attributes
);
...
...
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