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
6450fb3b
Commit
6450fb3b
authored
Mar 17, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Fix buffer alignment calculation.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
eead400b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
buffer.c
dlls/mfplat/buffer.c
+3
-3
No files found.
dlls/mfplat/buffer.c
View file @
6450fb3b
...
...
@@ -24,7 +24,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mfplat
);
#define ALIGN_SIZE(size, alignment) (((size) + (alignment
- 1)) & ~((alignment - 1
)))
#define ALIGN_SIZE(size, alignment) (((size) + (alignment
)) & ~((alignment
)))
struct
memory_buffer
{
...
...
@@ -262,7 +262,7 @@ static HRESULT WINAPI memory_1d_2d_buffer_Lock(IMFMediaBuffer *iface, BYTE **dat
hr
=
MF_E_INVALIDREQUEST
;
else
if
(
!
buffer
->
_2d
.
linear_buffer
)
{
if
(
!
(
buffer
->
_2d
.
linear_buffer
=
heap_alloc
(
ALIGN_SIZE
(
buffer
->
_2d
.
plane_size
,
64
))))
if
(
!
(
buffer
->
_2d
.
linear_buffer
=
heap_alloc
(
ALIGN_SIZE
(
buffer
->
_2d
.
plane_size
,
MF_64_BYTE_ALIGNMENT
))))
hr
=
E_OUTOFMEMORY
;
}
...
...
@@ -575,7 +575,7 @@ static HRESULT create_2d_buffer(DWORD width, DWORD height, DWORD fourcc, BOOL bo
if
(
!
object
)
return
E_OUTOFMEMORY
;
pitch
=
ALIGN_SIZE
(
width
*
bpp
,
64
);
pitch
=
ALIGN_SIZE
(
width
*
bpp
,
MF_64_BYTE_ALIGNMENT
);
switch
(
fourcc
)
{
...
...
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