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
dae643d2
Commit
dae643d2
authored
Mar 24, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Fix SetCurrentLength() for d3d11 buffer.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ff056c3f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
buffer.c
dlls/mfplat/buffer.c
+12
-1
mfplat.c
dlls/mfplat/tests/mfplat.c
+16
-0
No files found.
dlls/mfplat/buffer.c
View file @
dae643d2
...
...
@@ -856,6 +856,17 @@ static HRESULT WINAPI dxgi_surface_buffer_Unlock(IMFMediaBuffer *iface)
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dxgi_surface_buffer_SetCurrentLength
(
IMFMediaBuffer
*
iface
,
DWORD
current_length
)
{
struct
memory_buffer
*
buffer
=
impl_from_IMFMediaBuffer
(
iface
);
TRACE
(
"%p, %u.
\n
"
,
iface
,
current_length
);
buffer
->
current_length
=
current_length
;
return
S_OK
;
}
static
HRESULT
WINAPI
dxgi_surface_buffer_Lock2D
(
IMF2DBuffer2
*
iface
,
BYTE
**
scanline0
,
LONG
*
pitch
)
{
FIXME
(
"%p, %p, %p.
\n
"
,
iface
,
scanline0
,
pitch
);
...
...
@@ -977,7 +988,7 @@ static const IMFMediaBufferVtbl dxgi_surface_1d_buffer_vtbl =
dxgi_surface_buffer_Lock
,
dxgi_surface_buffer_Unlock
,
memory_buffer_GetCurrentLength
,
memory
_buffer_SetCurrentLength
,
dxgi_surface
_buffer_SetCurrentLength
,
memory_buffer_GetMaxLength
,
};
...
...
dlls/mfplat/tests/mfplat.c
View file @
dae643d2
...
...
@@ -6350,6 +6350,22 @@ static void test_dxgi_surface_buffer(void)
check_interface
(
buffer
,
&
IID_IMFDXGIBuffer
,
TRUE
);
check_interface
(
buffer
,
&
IID_IMFGetService
,
FALSE
);
max_length
=
0
;
hr
=
IMFMediaBuffer_GetMaxLength
(
buffer
,
&
max_length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
!!
max_length
,
"Unexpected length %u.
\n
"
,
max_length
);
hr
=
IMFMediaBuffer_GetCurrentLength
(
buffer
,
&
cur_length
);
ok
(
hr
==
S_OK
,
"Failed to get length, hr %#x.
\n
"
,
hr
);
ok
(
!
cur_length
,
"Unexpected length %u.
\n
"
,
cur_length
);
hr
=
IMFMediaBuffer_SetCurrentLength
(
buffer
,
2
*
max_length
);
ok
(
hr
==
S_OK
,
"Failed to get length, hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaBuffer_GetCurrentLength
(
buffer
,
&
cur_length
);
ok
(
hr
==
S_OK
,
"Failed to get length, hr %#x.
\n
"
,
hr
);
ok
(
cur_length
==
2
*
max_length
,
"Unexpected length %u.
\n
"
,
cur_length
);
hr
=
IMFMediaBuffer_QueryInterface
(
buffer
,
&
IID_IMFDXGIBuffer
,
(
void
**
)
&
dxgi_buffer
);
ok
(
hr
==
S_OK
,
"Failed to get interface, 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