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
8c4723c5
Commit
8c4723c5
authored
Oct 22, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/mixer: Only accept single output buffer in ProcessOutput().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
775daad7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
mixer.c
dlls/evr/mixer.c
+3
-3
evr.c
dlls/evr/tests/evr.c
+20
-9
No files found.
dlls/evr/mixer.c
View file @
8c4723c5
...
...
@@ -1136,11 +1136,11 @@ static HRESULT WINAPI video_mixer_transform_ProcessOutput(IMFTransform *iface, D
TRACE
(
"%p, %#x, %u, %p, %p.
\n
"
,
iface
,
flags
,
count
,
buffers
,
status
);
if
(
!
buffers
||
!
count
||
!
buffers
->
pSample
)
if
(
!
buffers
||
!
count
||
count
>
1
||
!
buffers
->
pSample
)
return
E_INVALIDARG
;
if
(
count
>
1
)
FIXME
(
"Multiple buffers are not handled.
\n
"
)
;
if
(
buffers
->
dwStreamID
)
return
MF_E_INVALIDSTREAMNUMBER
;
*
status
=
0
;
...
...
dlls/evr/tests/evr.c
View file @
8c4723c5
...
...
@@ -2061,7 +2061,7 @@ static DWORD get_surface_color(IDirect3DSurface9 *surface, unsigned int x, unsig
static
void
test_mixer_samples
(
void
)
{
IDirect3DDeviceManager9
*
manager
;
MFT_OUTPUT_DATA_BUFFER
buffer
;
MFT_OUTPUT_DATA_BUFFER
buffer
s
[
2
]
;
IMFVideoProcessor
*
processor
;
IDirect3DSurface9
*
surface
;
IMFDesiredSample
*
desired
;
...
...
@@ -2149,16 +2149,16 @@ static void test_mixer_samples(void)
IMFMediaType_Release
(
video_type
);
memset
(
&
buffer
,
0
,
sizeof
(
buffer
));
hr
=
IMFTransform_ProcessOutput
(
mixer
,
0
,
1
,
&
buffer
,
&
status
);
memset
(
buffers
,
0
,
sizeof
(
buffers
));
hr
=
IMFTransform_ProcessOutput
(
mixer
,
0
,
1
,
buffers
,
&
status
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
/* It needs a sample with a backing surface. */
hr
=
MFCreateSample
(
&
sample
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
buffer
.
pSample
=
sample
;
hr
=
IMFTransform_ProcessOutput
(
mixer
,
0
,
1
,
&
buffer
,
&
status
);
buffer
s
[
0
]
.
pSample
=
sample
;
hr
=
IMFTransform_ProcessOutput
(
mixer
,
0
,
1
,
buffers
,
&
status
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFSample_Release
(
sample
);
...
...
@@ -2171,8 +2171,8 @@ static void test_mixer_samples(void)
hr
=
IMFSample_QueryInterface
(
sample
,
&
IID_IMFDesiredSample
,
(
void
**
)
&
desired
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
buffer
.
pSample
=
sample
;
hr
=
IMFTransform_ProcessOutput
(
mixer
,
0
,
1
,
&
buffer
,
&
status
);
buffer
s
[
0
]
.
pSample
=
sample
;
hr
=
IMFTransform_ProcessOutput
(
mixer
,
0
,
1
,
buffers
,
&
status
);
todo_wine
ok
(
hr
==
MF_E_TRANSFORM_NEED_MORE_INPUT
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
@@ -2183,7 +2183,7 @@ todo_wine
/* Streaming is not started yet. Output is colored black, but only if desired timestamps were set. */
IMFDesiredSample_SetDesiredSampleTimeAndDuration
(
desired
,
100
,
0
);
hr
=
IMFTransform_ProcessOutput
(
mixer
,
0
,
1
,
&
buffer
,
&
status
);
hr
=
IMFTransform_ProcessOutput
(
mixer
,
0
,
1
,
buffers
,
&
status
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
color
=
get_surface_color
(
surface
,
0
,
0
);
...
...
@@ -2192,12 +2192,23 @@ todo_wine
hr
=
IMFVideoProcessor_SetBackgroundColor
(
processor
,
RGB
(
0
,
0
,
255
));
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_ProcessOutput
(
mixer
,
0
,
1
,
&
buffer
,
&
status
);
hr
=
IMFTransform_ProcessOutput
(
mixer
,
0
,
1
,
buffers
,
&
status
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
color
=
get_surface_color
(
surface
,
0
,
0
);
ok
(
!
color
,
"Unexpected color %#x.
\n
"
,
color
);
hr
=
IMFTransform_ProcessOutput
(
mixer
,
0
,
2
,
buffers
,
&
status
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
buffers
[
1
].
pSample
=
sample
;
hr
=
IMFTransform_ProcessOutput
(
mixer
,
0
,
2
,
buffers
,
&
status
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
buffers
[
0
].
dwStreamID
=
1
;
hr
=
IMFTransform_ProcessOutput
(
mixer
,
0
,
1
,
buffers
,
&
status
);
ok
(
hr
==
MF_E_INVALIDSTREAMNUMBER
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFDesiredSample_Clear
(
desired
);
hr
=
IMFTransform_ProcessInput
(
mixer
,
0
,
NULL
,
0
);
...
...
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