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
17613e0a
Commit
17613e0a
authored
Mar 27, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Use current stream position when async request is made.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5c052b69
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
main.c
dlls/mfplat/main.c
+4
-2
No files found.
dlls/mfplat/main.c
View file @
17613e0a
...
@@ -2013,6 +2013,7 @@ struct async_stream_op
...
@@ -2013,6 +2013,7 @@ struct async_stream_op
const
BYTE
*
src
;
const
BYTE
*
src
;
BYTE
*
dest
;
BYTE
*
dest
;
}
u
;
}
u
;
QWORD
position
;
ULONG
requested_length
;
ULONG
requested_length
;
ULONG
actual_length
;
ULONG
actual_length
;
IMFAsyncResult
*
caller
;
IMFAsyncResult
*
caller
;
...
@@ -2087,6 +2088,7 @@ static HRESULT bytestream_create_io_request(struct bytestream *stream, enum asyn
...
@@ -2087,6 +2088,7 @@ static HRESULT bytestream_create_io_request(struct bytestream *stream, enum asyn
op
->
IUnknown_iface
.
lpVtbl
=
&
async_stream_op_vtbl
;
op
->
IUnknown_iface
.
lpVtbl
=
&
async_stream_op_vtbl
;
op
->
refcount
=
1
;
op
->
refcount
=
1
;
op
->
u
.
src
=
data
;
op
->
u
.
src
=
data
;
op
->
position
=
stream
->
position
;
op
->
requested_length
=
size
;
op
->
requested_length
=
size
;
op
->
type
=
type
;
op
->
type
=
type
;
if
(
FAILED
(
hr
=
MFCreateAsyncResult
((
IUnknown
*
)
&
stream
->
IMFByteStream_iface
,
callback
,
state
,
&
op
->
caller
)))
if
(
FAILED
(
hr
=
MFCreateAsyncResult
((
IUnknown
*
)
&
stream
->
IMFByteStream_iface
,
callback
,
state
,
&
op
->
caller
)))
...
@@ -2645,7 +2647,7 @@ static HRESULT WINAPI bytestream_stream_read_callback_Invoke(IMFAsyncCallback *i
...
@@ -2645,7 +2647,7 @@ static HRESULT WINAPI bytestream_stream_read_callback_Invoke(IMFAsyncCallback *i
op
=
impl_async_stream_op_from_IUnknown
(
object
);
op
=
impl_async_stream_op_from_IUnknown
(
object
);
position
.
QuadPart
=
stream
->
position
;
position
.
QuadPart
=
op
->
position
;
if
(
SUCCEEDED
(
hr
=
IStream_Seek
(
stream
->
stream
,
position
,
STREAM_SEEK_SET
,
NULL
)))
if
(
SUCCEEDED
(
hr
=
IStream_Seek
(
stream
->
stream
,
position
,
STREAM_SEEK_SET
,
NULL
)))
{
{
if
(
SUCCEEDED
(
hr
=
IStream_Read
(
stream
->
stream
,
op
->
u
.
dest
,
op
->
requested_length
,
&
op
->
actual_length
)))
if
(
SUCCEEDED
(
hr
=
IStream_Read
(
stream
->
stream
,
op
->
u
.
dest
,
op
->
requested_length
,
&
op
->
actual_length
)))
...
@@ -2676,7 +2678,7 @@ static HRESULT WINAPI bytestream_stream_write_callback_Invoke(IMFAsyncCallback *
...
@@ -2676,7 +2678,7 @@ static HRESULT WINAPI bytestream_stream_write_callback_Invoke(IMFAsyncCallback *
op
=
impl_async_stream_op_from_IUnknown
(
object
);
op
=
impl_async_stream_op_from_IUnknown
(
object
);
position
.
QuadPart
=
stream
->
position
;
position
.
QuadPart
=
op
->
position
;
if
(
SUCCEEDED
(
hr
=
IStream_Seek
(
stream
->
stream
,
position
,
STREAM_SEEK_SET
,
NULL
)))
if
(
SUCCEEDED
(
hr
=
IStream_Seek
(
stream
->
stream
,
position
,
STREAM_SEEK_SET
,
NULL
)))
{
{
if
(
SUCCEEDED
(
hr
=
IStream_Write
(
stream
->
stream
,
op
->
u
.
src
,
op
->
requested_length
,
&
op
->
actual_length
)))
if
(
SUCCEEDED
(
hr
=
IStream_Write
(
stream
->
stream
,
op
->
u
.
src
,
op
->
requested_length
,
&
op
->
actual_length
)))
...
...
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