Commit 76b91051 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

amstream: Remove ERR() on HeapAlloc failure for small sizes known at compile time.

parent 5ef8a8b2
......@@ -63,10 +63,7 @@ HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj)
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAMMultiMediaStreamImpl));
if (!object)
{
ERR("Out of memory\n");
return E_OUTOFMEMORY;
}
object->IAMMultiMediaStream_iface.lpVtbl = &AM_Vtbl;
object->ref = 1;
......
......@@ -143,10 +143,7 @@ HRESULT AMAudioData_create(IUnknown *pUnkOuter, LPVOID *ppObj)
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(AMAudioDataImpl));
if (!object)
{
ERR("Out of memory\n");
return E_OUTOFMEMORY;
}
object->IAudioData_iface.lpVtbl = &AudioData_Vtbl;
object->ref = 1;
......
......@@ -436,10 +436,7 @@ HRESULT ddrawmediastream_create(IMultiMediaStream *parent, const MSPID *purpose_
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DirectDrawMediaStreamImpl));
if (!object)
{
ERR("Out of memory\n");
return E_OUTOFMEMORY;
}
object->IAMMediaStream_iface.lpVtbl = &DirectDrawMediaStreamImpl_IAMMediaStream_Vtbl;
object->IDirectDrawMediaStream_iface.lpVtbl = &DirectDrawMediaStreamImpl_IDirectDrawMediaStream_Vtbl;
......@@ -839,10 +836,7 @@ HRESULT audiomediastream_create(IMultiMediaStream *parent, const MSPID *purpose_
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(AudioMediaStreamImpl));
if (!object)
{
ERR("Out of memory\n");
return E_OUTOFMEMORY;
}
object->IAMMediaStream_iface.lpVtbl = &AudioMediaStreamImpl_IAMMediaStream_Vtbl;
object->IAudioMediaStream_iface.lpVtbl = &AudioMediaStreamImpl_IAudioMediaStream_Vtbl;
......@@ -992,10 +986,7 @@ static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectD
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectDrawStreamSampleImpl));
if (!object)
{
ERR("Out of memory\n");
return E_OUTOFMEMORY;
}
object->IDirectDrawStreamSample_iface.lpVtbl = &DirectDrawStreamSample_Vtbl;
object->ref = 1;
......@@ -1133,10 +1124,7 @@ static HRESULT audiostreamsample_create(IAudioMediaStream *parent, IAudioData *a
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAudioStreamSampleImpl));
if (!object)
{
ERR("Out of memory\n");
return E_OUTOFMEMORY;
}
object->IAudioStreamSample_iface.lpVtbl = &AudioStreamSample_Vtbl;
object->ref = 1;
......
......@@ -516,10 +516,7 @@ HRESULT MediaStreamFilter_create(IUnknown *pUnkOuter, void **ppObj)
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IMediaStreamFilterImpl));
if (!object)
{
ERR("Out of memory\n");
return E_OUTOFMEMORY;
}
BaseFilter_Init(&object->filter, (IBaseFilterVtbl*)&MediaStreamFilter_Vtbl, &CLSID_MediaStreamFilter, (DWORD_PTR)(__FILE__ ": MediaStreamFilterImpl.csFilter"), &BaseFuncTable);
......
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