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
068593b2
Commit
068593b2
authored
May 14, 2011
by
Erich Hoover
Committed by
Alexandre Julliard
May 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Create and hold onto a preferred allocator for IAsyncReader::RequestAllocator.
parent
493a3a0f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
pin.c
dlls/quartz/pin.c
+17
-1
pin.h
dlls/quartz/pin.h
+1
-0
No files found.
dlls/quartz/pin.c
View file @
068593b2
...
...
@@ -283,6 +283,7 @@ HRESULT WINAPI PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const
This
->
pReader
=
NULL
;
This
->
pAlloc
=
NULL
;
This
->
prefAlloc
=
NULL
;
if
(
SUCCEEDED
(
hr
))
{
hr
=
IPin_QueryInterface
(
pReceivePin
,
&
IID_IAsyncReader
,
(
LPVOID
*
)
&
This
->
pReader
);
...
...
@@ -293,9 +294,19 @@ HRESULT WINAPI PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const
hr
=
This
->
fnPreConnect
(
iface
,
pReceivePin
,
&
props
);
}
/*
* Some custom filters (such as the one used by Fallout 3
* and Fallout: New Vegas) expect to be passed a non-NULL
* preferred allocator.
*/
if
(
SUCCEEDED
(
hr
))
{
hr
=
IAsyncReader_RequestAllocator
(
This
->
pReader
,
NULL
,
&
props
,
&
This
->
pAlloc
);
hr
=
StdMemAllocator_create
(
NULL
,
(
LPVOID
*
)
&
This
->
prefAlloc
);
}
if
(
SUCCEEDED
(
hr
))
{
hr
=
IAsyncReader_RequestAllocator
(
This
->
pReader
,
This
->
prefAlloc
,
&
props
,
&
This
->
pAlloc
);
}
if
(
SUCCEEDED
(
hr
))
...
...
@@ -314,6 +325,9 @@ HRESULT WINAPI PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const
if
(
This
->
pReader
)
IAsyncReader_Release
(
This
->
pReader
);
This
->
pReader
=
NULL
;
if
(
This
->
prefAlloc
)
IMemAllocator_Release
(
This
->
prefAlloc
);
This
->
prefAlloc
=
NULL
;
if
(
This
->
pAlloc
)
IMemAllocator_Release
(
This
->
pAlloc
);
This
->
pAlloc
=
NULL
;
...
...
@@ -366,6 +380,8 @@ ULONG WINAPI PullPin_Release(IPin *iface)
WaitForSingleObject
(
This
->
hEventStateChanged
,
INFINITE
);
assert
(
!
This
->
hThread
);
if
(
This
->
prefAlloc
)
IMemAllocator_Release
(
This
->
prefAlloc
);
if
(
This
->
pAlloc
)
IMemAllocator_Release
(
This
->
pAlloc
);
if
(
This
->
pReader
)
...
...
dlls/quartz/pin.h
View file @
068593b2
...
...
@@ -73,6 +73,7 @@ typedef struct PullPin
REFERENCE_TIME
rtStart
,
rtCurrent
,
rtNext
,
rtStop
;
IAsyncReader
*
pReader
;
IMemAllocator
*
prefAlloc
;
IMemAllocator
*
pAlloc
;
QUERYACCEPTPROC
fnQueryAccept
;
SAMPLEPROC_PULL
fnSampleProc
;
...
...
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