Akihiro Sagawa : wineqtdecoder: Always pass non-NULL preferred allocator to IAsyncReader:: RequestAllocator.
Alexandre Julliard
julliard at winehq.org
Mon Nov 21 15:28:12 CST 2016
Module: wine
Branch: master
Commit: 4def77e4f8b1b16dc95309e4a40ce84ca7630cff
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4def77e4f8b1b16dc95309e4a40ce84ca7630cff
Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date: Sun Nov 20 15:33:19 2016 +0900
wineqtdecoder: Always pass non-NULL preferred allocator to IAsyncReader::RequestAllocator.
Signed-off-by: Akihiro Sagawa <sagawa.aki at gmail.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wineqtdecoder/qtsplitter.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c
index 4e12242..1d5b808 100644
--- a/dlls/wineqtdecoder/qtsplitter.c
+++ b/dlls/wineqtdecoder/qtsplitter.c
@@ -1101,6 +1101,7 @@ static HRESULT WINAPI QTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
HRESULT hr = S_OK;
ALLOCATOR_PROPERTIES props;
QTInPin *This = impl_from_IPin(iface);
+ IMemAllocator *pAlloc;
TRACE("(%p/%p)->(%p, %p)\n", This, iface, pReceivePin, pmt);
@@ -1150,8 +1151,18 @@ static HRESULT WINAPI QTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
props.cbAlign = 1;
props.cbBuffer = impl_from_IBaseFilter(This->pin.pinInfo.pFilter)->outputSize + props.cbAlign;
props.cbPrefix = 0;
+ hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC,
+ &IID_IMemAllocator, (LPVOID *)&pAlloc);
+ if (SUCCEEDED(hr))
+ {
+ /* A certain IAsyncReader::RequestAllocator expects to be passed
+ non-NULL preferred allocator */
+ hr = IAsyncReader_RequestAllocator(This->pReader, pAlloc, &props, &This->pAlloc);
+ if (FAILED(hr))
+ WARN("Can't get an allocator, got %08x\n", hr);
+ IMemAllocator_Release(pAlloc);
+ }
- hr = IAsyncReader_RequestAllocator(This->pReader, NULL, &props, &This->pAlloc);
if (SUCCEEDED(hr))
{
CopyMediaType(&This->pin.mtCurrent, pmt);
More information about the wine-cvs
mailing list