[PATCH v2 1/2] winegstreamer: Allocate media type format blocks with CoTaskMemAlloc().

Zebediah Figura z.figura12 at gmail.com
Mon Mar 16 14:20:40 CDT 2020


Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 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 6897eeda3f1..5a7f696ef14 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) {
-- 
2.25.1




More information about the wine-devel mailing list