wineqtdecoder: Always pass non-NULL preferred allocator to IAsyncReader::RequestAllocator.
Andrew Eikum
aeikum at codeweavers.com
Mon Nov 21 11:34:58 CST 2016
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
On Sun, Nov 20, 2016 at 03:33:19PM +0900, Akihiro Sagawa wrote:
> Here is a patch for wineqtdecoder.
> Andrew, could you try to compile-test it before signed-off?
> Thanks in advance.
>
> Signed-off-by: Akihiro Sagawa <sagawa.aki at gmail.com>
> ---
> 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-patches
mailing list