EnumMedia patch
Robert Shearman
rob at codeweavers.com
Sun May 1 02:24:15 CDT 2005
Maarten Lankhorst wrote:
> This patch fixes AM_MEDIA_TYPE->pbFormat not being handled correctly,
> unfortunately, this also means some stuff has to be rewritten to avoid
> memleaks, instead of CoTaskMemFree(AM_MEDIA_TYPE), DeleteMediaType has
> to be used.. This also fixes the errors i had with msn webcam, i feel
> like i stumbled over every bug in quartz now......
>
>------------------------------------------------------------------------
>
>@@ -45,6 +46,7 @@ void DeleteMediaType(AM_MEDIA_TYPE * pMe
> IUnknown_Release(pMediaType->pUnk);
> pMediaType->pUnk = NULL;
> }
>+ CoTaskMemFree(pMediaType);
> }
>
> BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, BOOL bWildcards)
>
>
This change is wrong. DeleteMediaType is not supposed to free the memory
used for the AM_MEDIA_TYPE structure itself as the function is also used
in places where the AM_MEDIA_TYPE was not allocated using CoTaskMemAlloc.
Rob
More information about the wine-devel
mailing list