Module: wine Branch: master Commit: 57492f55fdf17444c68ef57525240d8dbd4b4baa URL: https://source.winehq.org/git/wine.git/?a=commit;h=57492f55fdf17444c68ef5752...
Author: Zebediah Figura z.figura12@gmail.com Date: Mon Mar 16 14:40:13 2020 -0500
winegstreamer: Allocate media type format blocks with CoTaskMemAlloc().
Signed-off-by: Zebediah Figura zfigura@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winegstreamer/gstdemux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index e9548e80e4..0b00fc5339 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -121,7 +121,7 @@ static gboolean amt_from_gst_caps_audio_raw(const GstCaps *caps, AM_MEDIA_TYPE * if (!gst_audio_info_from_caps (&ainfo, caps)) return FALSE;
- wfe = heap_alloc(sizeof(*wfe)); + wfe = CoTaskMemAlloc(sizeof(*wfe)); wfx = (WAVEFORMATEX*)wfe; amt->majortype = MEDIATYPE_Audio; amt->subtype = MEDIASUBTYPE_PCM; @@ -186,7 +186,7 @@ static gboolean amt_from_gst_caps_video_raw(const GstCaps *caps, AM_MEDIA_TYPE * nom = vinfo.fps_n; denom = vinfo.fps_d;
- vih = heap_alloc(sizeof(*vih)); + vih = CoTaskMemAlloc(sizeof(*vih)); bih = &vih->bmiHeader;
amt->formattype = FORMAT_VideoInfo; @@ -225,14 +225,14 @@ static gboolean amt_from_gst_caps_video_raw(const GstCaps *caps, AM_MEDIA_TYPE * break; default: FIXME("Unhandled type %s.\n", vinfo.finfo->name); - heap_free(vih); + CoTaskMemFree(vih); return FALSE; } bih->biCompression = BI_RGB; } else { amt->subtype = MEDIATYPE_Video; if (!(amt->subtype.Data1 = gst_video_format_to_fourcc(vinfo.finfo->format))) { - heap_free(vih); + CoTaskMemFree(vih); return FALSE; } switch (amt->subtype.Data1) {