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
ffae0d81
Commit
ffae0d81
authored
May 09, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Oct 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/buffer: Use absolute pitch in memory_1d_2d_buffer_[Un]Lock().
parent
3bc570e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
buffer.c
dlls/mfplat/buffer.c
+12
-2
No files found.
dlls/mfplat/buffer.c
View file @
ffae0d81
...
...
@@ -313,8 +313,14 @@ static HRESULT WINAPI memory_1d_2d_buffer_Lock(IMFMediaBuffer *iface, BYTE **dat
hr
=
E_OUTOFMEMORY
;
if
(
SUCCEEDED
(
hr
))
copy_image
(
buffer
,
buffer
->
_2d
.
linear_buffer
,
buffer
->
_2d
.
width
,
buffer
->
data
,
buffer
->
_2d
.
pitch
,
{
int
pitch
=
buffer
->
_2d
.
pitch
;
if
(
pitch
<
0
)
pitch
=
-
pitch
;
copy_image
(
buffer
,
buffer
->
_2d
.
linear_buffer
,
buffer
->
_2d
.
width
,
buffer
->
data
,
pitch
,
buffer
->
_2d
.
width
,
buffer
->
_2d
.
height
);
}
}
if
(
SUCCEEDED
(
hr
))
...
...
@@ -342,7 +348,11 @@ static HRESULT WINAPI memory_1d_2d_buffer_Unlock(IMFMediaBuffer *iface)
if
(
buffer
->
_2d
.
linear_buffer
&&
!--
buffer
->
_2d
.
locks
)
{
copy_image
(
buffer
,
buffer
->
data
,
buffer
->
_2d
.
pitch
,
buffer
->
_2d
.
linear_buffer
,
buffer
->
_2d
.
width
,
int
pitch
=
buffer
->
_2d
.
pitch
;
if
(
pitch
<
0
)
pitch
=
-
pitch
;
copy_image
(
buffer
,
buffer
->
data
,
pitch
,
buffer
->
_2d
.
linear_buffer
,
buffer
->
_2d
.
width
,
buffer
->
_2d
.
width
,
buffer
->
_2d
.
height
);
free
(
buffer
->
_2d
.
linear_buffer
);
...
...
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