Commit 326f44e1 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfplay: Use CRT functions for heap allocations.

parent 342d7797
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "mferror.h" #include "mferror.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(mfplat); WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
...@@ -206,7 +205,7 @@ static ULONG WINAPI media_event_Release(IUnknown *iface) ...@@ -206,7 +205,7 @@ static ULONG WINAPI media_event_Release(IUnknown *iface)
break; break;
} }
heap_free(event); free(event);
} }
return refcount; return refcount;
...@@ -224,7 +223,7 @@ static HRESULT media_event_create(struct media_player *player, MFP_EVENT_TYPE ev ...@@ -224,7 +223,7 @@ static HRESULT media_event_create(struct media_player *player, MFP_EVENT_TYPE ev
{ {
struct media_event *object; struct media_event *object;
if (!(object = heap_alloc_zero(sizeof(*object)))) if (!(object = calloc(1, sizeof(*object))))
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
object->IUnknown_iface.lpVtbl = &media_event_vtbl; object->IUnknown_iface.lpVtbl = &media_event_vtbl;
...@@ -311,7 +310,7 @@ static ULONG WINAPI media_item_Release(IMFPMediaItem *iface) ...@@ -311,7 +310,7 @@ static ULONG WINAPI media_item_Release(IMFPMediaItem *iface)
if (item->pd) if (item->pd)
IMFPresentationDescriptor_Release(item->pd); IMFPresentationDescriptor_Release(item->pd);
free(item->url); free(item->url);
heap_free(item); free(item);
} }
return refcount; return refcount;
...@@ -554,7 +553,7 @@ static HRESULT create_media_item(IMFPMediaPlayer *player, DWORD_PTR user_data, s ...@@ -554,7 +553,7 @@ static HRESULT create_media_item(IMFPMediaPlayer *player, DWORD_PTR user_data, s
{ {
struct media_item *object; struct media_item *object;
if (!(object = heap_alloc_zero(sizeof(*object)))) if (!(object = calloc(1, sizeof(*object))))
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
object->IMFPMediaItem_iface.lpVtbl = &media_item_vtbl; object->IMFPMediaItem_iface.lpVtbl = &media_item_vtbl;
...@@ -659,7 +658,7 @@ static ULONG WINAPI media_player_Release(IMFPMediaPlayer *iface) ...@@ -659,7 +658,7 @@ static ULONG WINAPI media_player_Release(IMFPMediaPlayer *iface)
IMFMediaSession_Release(player->session); IMFMediaSession_Release(player->session);
DestroyWindow(player->event_window); DestroyWindow(player->event_window);
DeleteCriticalSection(&player->cs); DeleteCriticalSection(&player->cs);
heap_free(player); free(player);
platform_shutdown(); platform_shutdown();
} }
...@@ -1338,7 +1337,7 @@ HRESULT WINAPI MFPCreateMediaPlayer(const WCHAR *url, BOOL start_playback, MFP_C ...@@ -1338,7 +1337,7 @@ HRESULT WINAPI MFPCreateMediaPlayer(const WCHAR *url, BOOL start_playback, MFP_C
TRACE("%s, %d, %#x, %p, %p, %p.\n", debugstr_w(url), start_playback, options, callback, window, player); TRACE("%s, %d, %#x, %p, %p, %p.\n", debugstr_w(url), start_playback, options, callback, window, player);
if (!(object = heap_alloc_zero(sizeof(*object)))) if (!(object = calloc(1, sizeof(*object))))
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
platform_startup(); platform_startup();
......
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