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
5c057693
Commit
5c057693
authored
Feb 13, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/filesource: Zero-initialize the file source filter.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
81a7da48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
20 deletions
+13
-20
filesource.c
dlls/quartz/filesource.c
+13
-20
No files found.
dlls/quartz/filesource.c
View file @
5c057693
...
...
@@ -352,7 +352,7 @@ static void async_reader_destroy(struct strmbase_filter *iface)
CloseHandle
(
filter
->
port
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
CoTaskMemF
ree
(
filter
);
f
ree
(
filter
);
}
static
HRESULT
async_reader_query_interface
(
struct
strmbase_filter
*
iface
,
REFIID
iid
,
void
**
out
)
...
...
@@ -414,31 +414,24 @@ static DWORD CALLBACK io_thread(void *arg)
HRESULT
AsyncReader_create
(
IUnknown
*
outer
,
void
**
out
)
{
AsyncReader
*
pAsyncRead
;
pAsyncRead
=
CoTaskMemAlloc
(
sizeof
(
AsyncReader
));
AsyncReader
*
object
;
if
(
!
pAsyncRead
)
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
)))
)
return
E_OUTOFMEMORY
;
strmbase_filter_init
(
&
pAsyncRead
->
filter
,
outer
,
&
CLSID_AsyncReader
,
&
filter_ops
);
strmbase_filter_init
(
&
object
->
filter
,
outer
,
&
CLSID_AsyncReader
,
&
filter_ops
);
pAsyncRead
->
IFileSourceFilter_iface
.
lpVtbl
=
&
FileSource_Vtbl
;
object
->
IFileSourceFilter_iface
.
lpVtbl
=
&
FileSource_Vtbl
;
object
->
IAsyncReader_iface
.
lpVtbl
=
&
FileAsyncReader_Vtbl
;
pAsyncRead
->
IAsyncReader_iface
.
lpVtbl
=
&
FileAsyncReader_Vtbl
;
pAsyncRead
->
pszFileName
=
NULL
;
InitializeCriticalSection
(
&
pAsyncRead
->
sample_cs
);
pAsyncRead
->
sample_cs
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": FileAsyncReader.sample_cs"
);
InitializeConditionVariable
(
&
pAsyncRead
->
sample_cv
);
pAsyncRead
->
port
=
CreateIoCompletionPort
(
INVALID_HANDLE_VALUE
,
NULL
,
0
,
0
);
pAsyncRead
->
io_thread
=
CreateThread
(
NULL
,
0
,
io_thread
,
pAsyncRead
,
0
,
NULL
);
*
out
=
&
pAsyncRead
->
filter
.
IUnknown_inner
;
TRACE
(
"-- created at %p
\n
"
,
pAsyncRead
);
InitializeCriticalSection
(
&
object
->
sample_cs
);
object
->
sample_cs
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": FileAsyncReader.sample_cs"
);
InitializeConditionVariable
(
&
object
->
sample_cv
);
object
->
port
=
CreateIoCompletionPort
(
INVALID_HANDLE_VALUE
,
NULL
,
0
,
0
);
object
->
io_thread
=
CreateThread
(
NULL
,
0
,
io_thread
,
object
,
0
,
NULL
);
TRACE
(
"Created file source %p.
\n
"
,
object
);
*
out
=
&
object
->
filter
.
IUnknown_inner
;
return
S_OK
;
}
...
...
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