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
a216c0a2
Commit
a216c0a2
authored
Jun 28, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap/vfwcapture: Set the correct allocator properties when connecting.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4ed3eb47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
20 deletions
+10
-20
vfwcapture.c
dlls/qcap/vfwcapture.c
+10
-20
No files found.
dlls/qcap/vfwcapture.c
View file @
a216c0a2
...
...
@@ -190,17 +190,8 @@ static DWORD WINAPI stream_thread(void *arg)
static
HRESULT
vfw_capture_init_stream
(
struct
strmbase_filter
*
iface
)
{
struct
vfw_capture
*
filter
=
impl_from_strmbase_filter
(
iface
);
ALLOCATOR_PROPERTIES
req_props
,
ret_props
;
HRESULT
hr
;
req_props
.
cBuffers
=
3
;
req_props
.
cbBuffer
=
get_image_size
(
filter
);
req_props
.
cbAlign
=
1
;
req_props
.
cbPrefix
=
0
;
if
(
FAILED
(
hr
=
IMemAllocator_SetProperties
(
filter
->
source
.
pAllocator
,
&
req_props
,
&
ret_props
))
&&
hr
!=
VFW_E_ALREADY_COMMITTED
)
ERR
(
"Failed to set allocator properties (buffer size %u), hr %#x.
\n
"
,
req_props
.
cbBuffer
,
hr
);
if
(
FAILED
(
hr
=
IMemAllocator_Commit
(
filter
->
source
.
pAllocator
)))
ERR
(
"Failed to commit allocator, hr %#x.
\n
"
,
hr
);
...
...
@@ -688,20 +679,19 @@ static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, vo
}
static
HRESULT
WINAPI
VfwPin_DecideBufferSize
(
struct
strmbase_source
*
iface
,
IMemAllocator
*
pAlloc
,
ALLOCATOR_PROPERTIES
*
ppropInputRequest
)
IMemAllocator
*
allocator
,
ALLOCATOR_PROPERTIES
*
req_props
)
{
ALLOCATOR_PROPERTIES
actual
;
struct
vfw_capture
*
filter
=
impl_from_strmbase_pin
(
&
iface
->
pin
);
ALLOCATOR_PROPERTIES
ret_props
;
/* What we put here doesn't matter, the
driver function should override it then commit */
if
(
!
ppropInputRequest
->
cBuffers
)
ppropInputRequest
->
cBuffers
=
3
;
if
(
!
ppropInputRequest
->
cbBuffer
)
ppropInputRequest
->
cbBuffer
=
230400
;
if
(
!
ppropInputRequest
->
cbAlign
)
ppropInputRequest
->
cbAlign
=
1
;
if
(
!
req_props
->
cBuffers
)
req_props
->
cBuffers
=
3
;
if
(
!
req_props
->
cbBuffer
)
req_props
->
cbBuffer
=
get_image_size
(
filter
);
if
(
!
req_props
->
cbAlign
)
req_props
->
cbAlign
=
1
;
return
IMemAllocator_SetProperties
(
pAlloc
,
ppropInputRequest
,
&
actual
);
return
IMemAllocator_SetProperties
(
allocator
,
req_props
,
&
ret_props
);
}
static
const
struct
strmbase_source_ops
source_ops
=
...
...
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