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
ed1dd499
Commit
ed1dd499
authored
Nov 13, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/buffer: Fix byte width set for d3d9 surface buffers.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f3b0fc6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
buffer.c
dlls/mfplat/buffer.c
+13
-4
No files found.
dlls/mfplat/buffer.c
View file @
ed1dd499
...
...
@@ -941,6 +941,18 @@ static HRESULT create_d3d9_surface_buffer(IUnknown *surface, BOOL bottom_up, IMF
{
struct
memory_buffer
*
object
;
D3DSURFACE_DESC
desc
;
unsigned
int
stride
;
GUID
subtype
;
BOOL
is_yuv
;
IDirect3DSurface9_GetDesc
((
IDirect3DSurface9
*
)
surface
,
&
desc
);
TRACE
(
"format %#x, %u x %u.
\n
"
,
desc
.
Format
,
desc
.
Width
,
desc
.
Height
);
memcpy
(
&
subtype
,
&
MFVideoFormat_Base
,
sizeof
(
subtype
));
subtype
.
Data1
=
desc
.
Format
;
if
(
!
(
stride
=
mf_format_get_stride
(
&
subtype
,
desc
.
Width
,
&
is_yuv
)))
return
MF_E_INVALIDMEDIATYPE
;
object
=
heap_alloc_zero
(
sizeof
(
*
object
));
if
(
!
object
)
...
...
@@ -954,11 +966,8 @@ static HRESULT create_d3d9_surface_buffer(IUnknown *surface, BOOL bottom_up, IMF
object
->
d3d9_surface
.
surface
=
(
IDirect3DSurface9
*
)
surface
;
IUnknown_AddRef
(
surface
);
IDirect3DSurface9_GetDesc
(
object
->
d3d9_surface
.
surface
,
&
desc
);
TRACE
(
"format %#x, %u x %u.
\n
"
,
desc
.
Format
,
desc
.
Width
,
desc
.
Height
);
MFGetPlaneSize
(
desc
.
Format
,
desc
.
Width
,
desc
.
Height
,
&
object
->
_2d
.
plane_size
);
object
->
_2d
.
width
=
desc
.
Width
;
object
->
_2d
.
width
=
stride
;
object
->
_2d
.
height
=
desc
.
Height
;
object
->
max_length
=
object
->
_2d
.
plane_size
;
...
...
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