Commit bcb05ad2 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz/videorenderer: Avoid calling IPin::ConnectionMediaType() on our own pin.

Avoids leaking the format block. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 31bd0a6a
......@@ -136,30 +136,23 @@ static void VideoRenderer_AutoShowWindow(VideoRendererImpl *This)
static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data, DWORD size)
{
AM_MEDIA_TYPE amt;
HRESULT hr = S_OK;
const AM_MEDIA_TYPE *amt = &This->renderer.sink.pin.mt;
BITMAPINFOHEADER *bmiHeader;
HDC dc;
TRACE("(%p)->(%p, %d)\n", This, data, size);
hr = IPin_ConnectionMediaType(&This->renderer.sink.pin.IPin_iface, &amt);
if (FAILED(hr)) {
ERR("Unable to retrieve media type\n");
return hr;
}
if (IsEqualIID(&amt.formattype, &FORMAT_VideoInfo))
if (IsEqualGUID(&amt->formattype, &FORMAT_VideoInfo))
{
bmiHeader = &((VIDEOINFOHEADER *)amt.pbFormat)->bmiHeader;
bmiHeader = &((VIDEOINFOHEADER *)amt->pbFormat)->bmiHeader;
}
else if (IsEqualIID(&amt.formattype, &FORMAT_VideoInfo2))
else if (IsEqualGUID(&amt->formattype, &FORMAT_VideoInfo2))
{
bmiHeader = &((VIDEOINFOHEADER2 *)amt.pbFormat)->bmiHeader;
bmiHeader = &((VIDEOINFOHEADER2 *)amt->pbFormat)->bmiHeader;
}
else
{
FIXME("Unknown type %s\n", debugstr_guid(&amt.subtype));
FIXME("Unknown subtype %s.\n", debugstr_guid(&amt->subtype));
return VFW_E_RUNTIME_ERROR;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment