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
411ef13e
Commit
411ef13e
authored
May 05, 2022
by
Andrew Eikum
Committed by
Alexandre Julliard
May 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Simplify IMFByteStream async Read/Write methods.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4c999efd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
main.c
dlls/mfplat/main.c
+4
-16
No files found.
dlls/mfplat/main.c
View file @
411ef13e
...
...
@@ -4373,7 +4373,6 @@ static HRESULT WINAPI bytestream_stream_read_callback_Invoke(IRtwqAsyncCallback
{
struct
bytestream
*
stream
=
impl_from_read_callback_IRtwqAsyncCallback
(
iface
);
struct
async_stream_op
*
op
;
LARGE_INTEGER
position
;
IUnknown
*
object
;
HRESULT
hr
;
...
...
@@ -4384,13 +4383,8 @@ static HRESULT WINAPI bytestream_stream_read_callback_Invoke(IRtwqAsyncCallback
EnterCriticalSection
(
&
stream
->
cs
);
position
.
QuadPart
=
op
->
position
;
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
)))
stream
->
position
+=
op
->
actual_length
;
}
hr
=
IMFByteStream_Read
(
&
stream
->
IMFByteStream_iface
,
op
->
u
.
dest
,
op
->
requested_length
,
&
op
->
actual_length
);
if
(
FAILED
(
hr
))
TRACE
(
"Read failed: %#lx
\n
"
,
hr
);
IMFAsyncResult_SetStatus
(
op
->
caller
,
hr
);
list_add_tail
(
&
stream
->
pending
,
&
op
->
entry
);
...
...
@@ -4405,7 +4399,6 @@ static HRESULT WINAPI bytestream_stream_write_callback_Invoke(IRtwqAsyncCallback
{
struct
bytestream
*
stream
=
impl_from_read_callback_IRtwqAsyncCallback
(
iface
);
struct
async_stream_op
*
op
;
LARGE_INTEGER
position
;
IUnknown
*
object
;
HRESULT
hr
;
...
...
@@ -4416,13 +4409,8 @@ static HRESULT WINAPI bytestream_stream_write_callback_Invoke(IRtwqAsyncCallback
EnterCriticalSection
(
&
stream
->
cs
);
position
.
QuadPart
=
op
->
position
;
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
)))
stream
->
position
+=
op
->
actual_length
;
}
hr
=
IMFByteStream_Write
(
&
stream
->
IMFByteStream_iface
,
op
->
u
.
src
,
op
->
requested_length
,
&
op
->
actual_length
);
if
(
FAILED
(
hr
))
TRACE
(
"Write failed: %#lx
\n
"
,
hr
);
IMFAsyncResult_SetStatus
(
op
->
caller
,
hr
);
list_add_tail
(
&
stream
->
pending
,
&
op
->
entry
);
...
...
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