Commit 33208d8a authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfreadwrite/tests: Use CRT allocation functions.

parent b5f92fe7
...@@ -40,7 +40,6 @@ DEFINE_GUID(GUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); ...@@ -40,7 +40,6 @@ DEFINE_GUID(GUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
#include "d3d9.h" #include "d3d9.h"
#include "dxva2api.h" #include "dxva2api.h"
#include "wine/heap.h"
#include "wine/test.h" #include "wine/test.h"
static ULONG get_refcount(void *iface) static ULONG get_refcount(void *iface)
...@@ -145,7 +144,7 @@ static ULONG WINAPI test_media_stream_Release(IMFMediaStream *iface) ...@@ -145,7 +144,7 @@ static ULONG WINAPI test_media_stream_Release(IMFMediaStream *iface)
if (!refcount) if (!refcount)
{ {
IMFMediaEventQueue_Release(stream->event_queue); IMFMediaEventQueue_Release(stream->event_queue);
heap_free(stream); free(stream);
} }
return refcount; return refcount;
...@@ -297,7 +296,7 @@ static ULONG WINAPI test_source_Release(IMFMediaSource *iface) ...@@ -297,7 +296,7 @@ static ULONG WINAPI test_source_Release(IMFMediaSource *iface)
if (!refcount) if (!refcount)
{ {
IMFMediaEventQueue_Release(source->event_queue); IMFMediaEventQueue_Release(source->event_queue);
heap_free(source); free(source);
} }
return refcount; return refcount;
...@@ -488,7 +487,7 @@ static struct test_media_stream *create_test_stream(DWORD stream_index, IMFMedia ...@@ -488,7 +487,7 @@ static struct test_media_stream *create_test_stream(DWORD stream_index, IMFMedia
BOOL selected; BOOL selected;
HRESULT hr; HRESULT hr;
stream = heap_alloc_zero(sizeof(*stream)); stream = calloc(1, sizeof(*stream));
stream->IMFMediaStream_iface.lpVtbl = &test_media_stream_vtbl; stream->IMFMediaStream_iface.lpVtbl = &test_media_stream_vtbl;
stream->refcount = 1; stream->refcount = 1;
hr = MFCreateEventQueue(&stream->event_queue); hr = MFCreateEventQueue(&stream->event_queue);
...@@ -509,7 +508,7 @@ static IMFMediaSource *create_test_source(int stream_count) ...@@ -509,7 +508,7 @@ static IMFMediaSource *create_test_source(int stream_count)
struct test_source *source; struct test_source *source;
int i; int i;
source = heap_alloc_zero(sizeof(*source)); source = calloc(1, sizeof(*source));
source->IMFMediaSource_iface.lpVtbl = &test_source_vtbl; source->IMFMediaSource_iface.lpVtbl = &test_source_vtbl;
source->refcount = 1; source->refcount = 1;
source->stream_count = stream_count; source->stream_count = stream_count;
...@@ -606,9 +605,7 @@ static ULONG WINAPI async_callback_Release(IMFSourceReaderCallback *iface) ...@@ -606,9 +605,7 @@ static ULONG WINAPI async_callback_Release(IMFSourceReaderCallback *iface)
ULONG refcount = InterlockedDecrement(&callback->refcount); ULONG refcount = InterlockedDecrement(&callback->refcount);
if (!refcount) if (!refcount)
{ free(callback);
heap_free(callback);
}
return refcount; return refcount;
} }
...@@ -646,7 +643,7 @@ static struct async_callback *create_async_callback(void) ...@@ -646,7 +643,7 @@ static struct async_callback *create_async_callback(void)
{ {
struct async_callback *callback; struct async_callback *callback;
callback = heap_alloc(sizeof(*callback)); callback = calloc(1, sizeof(*callback));
callback->IMFSourceReaderCallback_iface.lpVtbl = &async_callback_vtbl; callback->IMFSourceReaderCallback_iface.lpVtbl = &async_callback_vtbl;
callback->refcount = 1; callback->refcount = 1;
......
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