quartz/tests: Use CRT memory allocators.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-05-16 16:37:27 -05:00 committed by Alexandre Julliard
parent 11c336b4a9
commit 226897bec7
4 changed files with 8 additions and 18 deletions

View File

@ -23,7 +23,6 @@
#define CONST_VTABLE #define CONST_VTABLE
#include "dshow.h" #include "dshow.h"
#include "wine/heap.h"
#include "wine/test.h" #include "wine/test.h"
static const GUID testguid = {0xabbccdde}; static const GUID testguid = {0xabbccdde};
@ -1486,14 +1485,8 @@ static HRESULT WINAPI testfilter_JoinFilterGraph(IBaseFilter *iface, IFilterGrap
if (winetest_debug > 1) trace("%p->JoinFilterGraph(%p, %s)\n", filter, graph, wine_dbgstr_w(name)); if (winetest_debug > 1) trace("%p->JoinFilterGraph(%p, %s)\n", filter, graph, wine_dbgstr_w(name));
filter->graph = graph; filter->graph = graph;
heap_free(filter->name); free(filter->name);
if (name) filter->name = name ? wcsdup(name) : NULL;
{
filter->name = heap_alloc((wcslen(name) + 1) * sizeof(WCHAR));
wcscpy(filter->name, name);
}
else
filter->name = NULL;
return S_OK; return S_OK;
} }

View File

@ -20,7 +20,6 @@
#define COBJMACROS #define COBJMACROS
#include "dshow.h" #include "dshow.h"
#include "wine/heap.h"
#include "wine/strmbase.h" #include "wine/strmbase.h"
#include "wine/test.h" #include "wine/test.h"
@ -765,13 +764,13 @@ static DWORD WINAPI frame_thread(void *arg)
hr = IMemInputPin_Receive(params->sink, params->sample); hr = IMemInputPin_Receive(params->sink, params->sample);
if (winetest_debug > 1) trace("%04x: Returned %#x.\n", GetCurrentThreadId(), hr); if (winetest_debug > 1) trace("%04x: Returned %#x.\n", GetCurrentThreadId(), hr);
IMediaSample_Release(params->sample); IMediaSample_Release(params->sample);
heap_free(params); free(params);
return hr; return hr;
} }
static HANDLE send_frame_time(IMemInputPin *sink, REFERENCE_TIME start_time, unsigned char color) static HANDLE send_frame_time(IMemInputPin *sink, REFERENCE_TIME start_time, unsigned char color)
{ {
struct frame_thread_params *params = heap_alloc(sizeof(*params)); struct frame_thread_params *params = malloc(sizeof(*params));
IMemAllocator *allocator; IMemAllocator *allocator;
REFERENCE_TIME end_time; REFERENCE_TIME end_time;
IMediaSample *sample; IMediaSample *sample;

View File

@ -23,7 +23,6 @@
#include "dshow.h" #include "dshow.h"
#include "d3d9.h" #include "d3d9.h"
#include "vmr9.h" #include "vmr9.h"
#include "wine/heap.h"
#include "wine/strmbase.h" #include "wine/strmbase.h"
#include "wine/test.h" #include "wine/test.h"
@ -969,13 +968,13 @@ static DWORD WINAPI frame_thread(void *arg)
hr = IMemInputPin_Receive(params->sink, params->sample); hr = IMemInputPin_Receive(params->sink, params->sample);
if (winetest_debug > 1) trace("%04x: Returned %#x.\n", GetCurrentThreadId(), hr); if (winetest_debug > 1) trace("%04x: Returned %#x.\n", GetCurrentThreadId(), hr);
IMediaSample_Release(params->sample); IMediaSample_Release(params->sample);
heap_free(params); free(params);
return hr; return hr;
} }
static HANDLE send_frame(IMemInputPin *sink) static HANDLE send_frame(IMemInputPin *sink)
{ {
struct frame_thread_params *params = heap_alloc(sizeof(*params)); struct frame_thread_params *params = malloc(sizeof(*params));
REFERENCE_TIME start_time, end_time; REFERENCE_TIME start_time, end_time;
IMemAllocator *allocator; IMemAllocator *allocator;
IMediaSample *sample; IMediaSample *sample;

View File

@ -28,7 +28,6 @@
#include "d3d9.h" #include "d3d9.h"
#include "vmr9.h" #include "vmr9.h"
#include "wmcodecdsp.h" #include "wmcodecdsp.h"
#include "wine/heap.h"
#include "wine/strmbase.h" #include "wine/strmbase.h"
#include "wine/test.h" #include "wine/test.h"
@ -976,13 +975,13 @@ static DWORD WINAPI frame_thread(void *arg)
hr = IMemInputPin_Receive(params->sink, params->sample); hr = IMemInputPin_Receive(params->sink, params->sample);
if (winetest_debug > 1) trace("%04x: Returned %#x.\n", GetCurrentThreadId(), hr); if (winetest_debug > 1) trace("%04x: Returned %#x.\n", GetCurrentThreadId(), hr);
IMediaSample_Release(params->sample); IMediaSample_Release(params->sample);
heap_free(params); free(params);
return hr; return hr;
} }
static HANDLE send_frame_time(IMemInputPin *sink, REFERENCE_TIME start_time, DWORD color) static HANDLE send_frame_time(IMemInputPin *sink, REFERENCE_TIME start_time, DWORD color)
{ {
struct frame_thread_params *params = heap_alloc(sizeof(*params)); struct frame_thread_params *params = malloc(sizeof(*params));
IMemAllocator *allocator; IMemAllocator *allocator;
REFERENCE_TIME end_time; REFERENCE_TIME end_time;
IMediaSample *sample; IMediaSample *sample;