Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
493b375f
Commit
493b375f
authored
Mar 25, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Use existing helper for BeginWrite() too.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
10338fc7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
24 deletions
+1
-24
main.c
dlls/mfplat/main.c
+1
-24
No files found.
dlls/mfplat/main.c
View file @
493b375f
...
...
@@ -2339,33 +2339,10 @@ static HRESULT WINAPI bytestream_BeginWrite(IMFByteStream *iface, const BYTE *da
IMFAsyncCallback
*
callback
,
IUnknown
*
state
)
{
struct
bytestream
*
stream
=
impl_from_IMFByteStream
(
iface
);
struct
async_stream_op
*
op
;
IMFAsyncResult
*
request
;
HRESULT
hr
;
TRACE
(
"%p, %p, %u, %p, %p.
\n
"
,
iface
,
data
,
size
,
callback
,
state
);
op
=
heap_alloc
(
sizeof
(
*
op
));
if
(
!
op
)
return
E_OUTOFMEMORY
;
op
->
IUnknown_iface
.
lpVtbl
=
&
async_stream_op_vtbl
;
op
->
refcount
=
1
;
op
->
u
.
src
=
data
;
op
->
requested_length
=
size
;
op
->
type
=
ASYNC_STREAM_OP_WRITE
;
if
(
FAILED
(
hr
=
MFCreateAsyncResult
((
IUnknown
*
)
iface
,
callback
,
state
,
&
op
->
caller
)))
goto
failed
;
if
(
FAILED
(
hr
=
MFCreateAsyncResult
(
&
op
->
IUnknown_iface
,
&
stream
->
write_callback
,
NULL
,
&
request
)))
goto
failed
;
MFPutWorkItemEx
(
MFASYNC_CALLBACK_QUEUE_STANDARD
,
request
);
IMFAsyncResult_Release
(
request
);
failed:
IUnknown_Release
(
&
op
->
IUnknown_iface
);
return
hr
;
return
bytestream_create_io_request
(
stream
,
ASYNC_STREAM_OP_WRITE
,
data
,
size
,
callback
,
state
);
}
static
HRESULT
WINAPI
bytestream_EndWrite
(
IMFByteStream
*
iface
,
IMFAsyncResult
*
result
,
ULONG
*
written
)
...
...
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