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
218c382f
Commit
218c382f
authored
Mar 30, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qedit/samplegrabber: Use calloc() in sample_grabber_create().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9bcb1f51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
21 deletions
+16
-21
samplegrabber.c
dlls/qedit/samplegrabber.c
+16
-21
No files found.
dlls/qedit/samplegrabber.c
View file @
218c382f
...
...
@@ -107,7 +107,7 @@ static void sample_grabber_destroy(struct strmbase_filter *iface)
strmbase_source_cleanup
(
&
filter
->
source
);
strmbase_passthrough_cleanup
(
&
filter
->
passthrough
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
CoTaskMemF
ree
(
filter
);
f
ree
(
filter
);
}
static
HRESULT
sample_grabber_query_interface
(
struct
strmbase_filter
*
iface
,
REFIID
iid
,
void
**
out
)
...
...
@@ -639,32 +639,27 @@ static const struct strmbase_source_ops source_ops =
HRESULT
sample_grabber_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
{
SG_Impl
*
obj
=
NULL
;
SG_Impl
*
object
;
obj
=
CoTaskMemAlloc
(
sizeof
(
SG_Impl
));
if
(
NULL
==
obj
)
{
*
out
=
NULL
;
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
}
ZeroMemory
(
obj
,
sizeof
(
SG_Impl
));
strmbase_filter_init
(
&
obj
->
filter
,
outer
,
&
CLSID_SampleGrabber
,
&
filter_ops
);
obj
->
ISampleGrabber_iface
.
lpVtbl
=
&
ISampleGrabber_VTable
;
obj
->
IMemInputPin_iface
.
lpVtbl
=
&
IMemInputPin_VTable
;
strmbase_filter_init
(
&
obj
ect
->
filter
,
outer
,
&
CLSID_SampleGrabber
,
&
filter_ops
);
obj
ect
->
ISampleGrabber_iface
.
lpVtbl
=
&
ISampleGrabber_VTable
;
obj
ect
->
IMemInputPin_iface
.
lpVtbl
=
&
IMemInputPin_VTable
;
strmbase_sink_init
(
&
obj
->
sink
,
&
obj
->
filter
,
L"In"
,
&
sink_ops
,
NULL
);
strmbase_sink_init
(
&
obj
ect
->
sink
,
&
object
->
filter
,
L"In"
,
&
sink_ops
,
NULL
);
strmbase_source_init
(
&
obj
->
source
,
&
obj
->
filter
,
L"Out"
,
&
source_ops
);
strmbase_passthrough_init
(
&
obj
->
passthrough
,
(
IUnknown
*
)
&
obj
->
source
.
pin
.
IPin_iface
);
ISeekingPassThru_Init
(
&
obj
->
passthrough
.
ISeekingPassThru_iface
,
FALSE
,
&
obj
->
sink
.
pin
.
IPin_iface
);
strmbase_source_init
(
&
object
->
source
,
&
object
->
filter
,
L"Out"
,
&
source_ops
);
strmbase_passthrough_init
(
&
object
->
passthrough
,
(
IUnknown
*
)
&
object
->
source
.
pin
.
IPin_iface
);
ISeekingPassThru_Init
(
&
object
->
passthrough
.
ISeekingPassThru_iface
,
FALSE
,
&
object
->
sink
.
pin
.
IPin_iface
);
obj
->
allocator
=
NULL
;
obj
->
grabberIface
=
NULL
;
obj
->
grabberMethod
=
-
1
;
obj
->
oneShot
=
OneShot_None
;
obj
->
bufferLen
=
-
1
;
obj
->
bufferData
=
NULL
;
object
->
grabberMethod
=
-
1
;
object
->
oneShot
=
OneShot_None
;
object
->
bufferLen
=
-
1
;
*
out
=
&
obj
->
filter
.
IUnknown_inner
;
TRACE
(
"Created sample grabber %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