Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qedit/samplegrabber.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-)
diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index afb48bf84df..90e4102afa4 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -107,7 +107,7 @@ static void sample_grabber_destroy(struct strmbase_filter *iface) strmbase_source_cleanup(&filter->source); strmbase_passthrough_cleanup(&filter->passthrough); strmbase_filter_cleanup(&filter->filter); - CoTaskMemFree(filter); + free(filter); }
static HRESULT sample_grabber_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) @@ -639,32 +639,27 @@ static const struct strmbase_source_ops source_ops =
HRESULT sample_grabber_create(IUnknown *outer, IUnknown **out) { - SG_Impl* obj = NULL; + SG_Impl *object;
- obj = CoTaskMemAlloc(sizeof(SG_Impl)); - if (NULL == obj) { - *out = NULL; + if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY; - } - ZeroMemory(obj, sizeof(SG_Impl));
- strmbase_filter_init(&obj->filter, outer, &CLSID_SampleGrabber, &filter_ops); - obj->ISampleGrabber_iface.lpVtbl = &ISampleGrabber_VTable; - obj->IMemInputPin_iface.lpVtbl = &IMemInputPin_VTable; + strmbase_filter_init(&object->filter, outer, &CLSID_SampleGrabber, &filter_ops); + object->ISampleGrabber_iface.lpVtbl = &ISampleGrabber_VTable; + object->IMemInputPin_iface.lpVtbl = &IMemInputPin_VTable;
- strmbase_sink_init(&obj->sink, &obj->filter, L"In", &sink_ops, NULL); + strmbase_sink_init(&object->sink, &object->filter, L"In", &sink_ops, NULL);
- strmbase_source_init(&obj->source, &obj->filter, L"Out", &source_ops); - strmbase_passthrough_init(&obj->passthrough, (IUnknown *)&obj->source.pin.IPin_iface); - ISeekingPassThru_Init(&obj->passthrough.ISeekingPassThru_iface, FALSE, &obj->sink.pin.IPin_iface); + strmbase_source_init(&object->source, &object->filter, L"Out", &source_ops); + strmbase_passthrough_init(&object->passthrough, (IUnknown *)&object->source.pin.IPin_iface); + ISeekingPassThru_Init(&object->passthrough.ISeekingPassThru_iface, FALSE, + &object->sink.pin.IPin_iface);
- obj->allocator = NULL; - obj->grabberIface = NULL; - obj->grabberMethod = -1; - obj->oneShot = OneShot_None; - obj->bufferLen = -1; - obj->bufferData = NULL; + object->grabberMethod = -1; + object->oneShot = OneShot_None; + object->bufferLen = -1;
- *out = &obj->filter.IUnknown_inner; + TRACE("Created sample grabber %p.\n", object); + *out = &object->filter.IUnknown_inner; return S_OK; }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qedit/samplegrabber.c | 96 +++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 48 deletions(-)
diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index 90e4102afa4..bd8480df48b 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -33,8 +33,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(qedit);
-/* Sample Grabber filter implementation */ -typedef struct _SG_Impl { +struct sample_grabber +{ struct strmbase_filter filter; ISampleGrabber ISampleGrabber_iface;
@@ -51,7 +51,7 @@ typedef struct _SG_Impl { LONG oneShot; LONG bufferLen; void* bufferData; -} SG_Impl; +};
enum { OneShot_None, @@ -59,24 +59,24 @@ enum { OneShot_Past, };
-static inline SG_Impl *impl_from_strmbase_filter(struct strmbase_filter *iface) +static struct sample_grabber *impl_from_strmbase_filter(struct strmbase_filter *iface) { - return CONTAINING_RECORD(iface, SG_Impl, filter); + return CONTAINING_RECORD(iface, struct sample_grabber, filter); }
-static inline SG_Impl *impl_from_ISampleGrabber(ISampleGrabber *iface) +static struct sample_grabber *impl_from_ISampleGrabber(ISampleGrabber *iface) { - return CONTAINING_RECORD(iface, SG_Impl, ISampleGrabber_iface); + return CONTAINING_RECORD(iface, struct sample_grabber, ISampleGrabber_iface); }
-static inline SG_Impl *impl_from_IMemInputPin(IMemInputPin *iface) +static struct sample_grabber *impl_from_IMemInputPin(IMemInputPin *iface) { - return CONTAINING_RECORD(iface, SG_Impl, IMemInputPin_iface); + return CONTAINING_RECORD(iface, struct sample_grabber, IMemInputPin_iface); }
/* Cleanup at end of life */ -static void SampleGrabber_cleanup(SG_Impl *This) +static void SampleGrabber_cleanup(struct sample_grabber *This) { TRACE("(%p)\n", This); if (This->allocator) @@ -89,7 +89,7 @@ static void SampleGrabber_cleanup(SG_Impl *This)
static struct strmbase_pin *sample_grabber_get_pin(struct strmbase_filter *iface, unsigned int index) { - SG_Impl *filter = impl_from_strmbase_filter(iface); + struct sample_grabber *filter = impl_from_strmbase_filter(iface);
if (index == 0) return &filter->sink.pin; @@ -100,7 +100,7 @@ static struct strmbase_pin *sample_grabber_get_pin(struct strmbase_filter *iface
static void sample_grabber_destroy(struct strmbase_filter *iface) { - SG_Impl *filter = impl_from_strmbase_filter(iface); + struct sample_grabber *filter = impl_from_strmbase_filter(iface);
SampleGrabber_cleanup(filter); strmbase_sink_cleanup(&filter->sink); @@ -112,7 +112,7 @@ static void sample_grabber_destroy(struct strmbase_filter *iface)
static HRESULT sample_grabber_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) { - SG_Impl *filter = impl_from_strmbase_filter(iface); + struct sample_grabber *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_ISampleGrabber)) *out = &filter->ISampleGrabber_iface; @@ -131,7 +131,7 @@ static const struct strmbase_filter_ops filter_ops = };
/* Helper that buffers data and/or calls installed sample callbacks */ -static void SampleGrabber_callback(SG_Impl *This, IMediaSample *sample) +static void SampleGrabber_callback(struct sample_grabber *This, IMediaSample *sample) { double time = 0.0; REFERENCE_TIME tStart, tEnd; @@ -192,31 +192,31 @@ static void SampleGrabber_callback(SG_Impl *This, IMediaSample *sample) static HRESULT WINAPI SampleGrabber_ISampleGrabber_QueryInterface(ISampleGrabber *iface, REFIID riid, void **ppv) { - SG_Impl *This = impl_from_ISampleGrabber(iface); - return IUnknown_QueryInterface(This->filter.outer_unk, riid, ppv); + struct sample_grabber *filter = impl_from_ISampleGrabber(iface); + return IUnknown_QueryInterface(filter->filter.outer_unk, riid, ppv); }
/* IUnknown */ static ULONG WINAPI SampleGrabber_ISampleGrabber_AddRef(ISampleGrabber *iface) { - SG_Impl *This = impl_from_ISampleGrabber(iface); - return IUnknown_AddRef(This->filter.outer_unk); + struct sample_grabber *filter = impl_from_ISampleGrabber(iface); + return IUnknown_AddRef(filter->filter.outer_unk); }
/* IUnknown */ static ULONG WINAPI SampleGrabber_ISampleGrabber_Release(ISampleGrabber *iface) { - SG_Impl *This = impl_from_ISampleGrabber(iface); - return IUnknown_Release(This->filter.outer_unk); + struct sample_grabber *filter = impl_from_ISampleGrabber(iface); + return IUnknown_Release(filter->filter.outer_unk); }
/* ISampleGrabber */ static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetOneShot(ISampleGrabber *iface, BOOL oneShot) { - SG_Impl *This = impl_from_ISampleGrabber(iface); + struct sample_grabber *This = impl_from_ISampleGrabber(iface); TRACE("(%p)->(%u)\n", This, oneShot); This->oneShot = oneShot ? OneShot_Wait : OneShot_None; return S_OK; @@ -225,7 +225,7 @@ SampleGrabber_ISampleGrabber_SetOneShot(ISampleGrabber *iface, BOOL oneShot) /* ISampleGrabber */ static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetMediaType(ISampleGrabber *iface, const AM_MEDIA_TYPE *mt) { - SG_Impl *filter = impl_from_ISampleGrabber(iface); + struct sample_grabber *filter = impl_from_ISampleGrabber(iface);
TRACE("filter %p, mt %p.\n", filter, mt); strmbase_dump_media_type(mt); @@ -242,7 +242,7 @@ static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetMediaType(ISampleGrabber * static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetConnectedMediaType(ISampleGrabber *iface, AM_MEDIA_TYPE *mt) { - SG_Impl *filter = impl_from_ISampleGrabber(iface); + struct sample_grabber *filter = impl_from_ISampleGrabber(iface);
TRACE("filter %p, mt %p.\n", filter, mt);
@@ -260,7 +260,7 @@ SampleGrabber_ISampleGrabber_GetConnectedMediaType(ISampleGrabber *iface, AM_MED static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetBufferSamples(ISampleGrabber *iface, BOOL bufferEm) { - SG_Impl *This = impl_from_ISampleGrabber(iface); + struct sample_grabber *This = impl_from_ISampleGrabber(iface); TRACE("(%p)->(%u)\n", This, bufferEm); EnterCriticalSection(&This->filter.csFilter); if (bufferEm) { @@ -277,7 +277,7 @@ SampleGrabber_ISampleGrabber_SetBufferSamples(ISampleGrabber *iface, BOOL buffer static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetCurrentBuffer(ISampleGrabber *iface, LONG *bufSize, LONG *buffer) { - SG_Impl *This = impl_from_ISampleGrabber(iface); + struct sample_grabber *This = impl_from_ISampleGrabber(iface); HRESULT ret = S_OK; TRACE("(%p)->(%p, %p)\n", This, bufSize, buffer); if (!bufSize) @@ -315,7 +315,7 @@ SampleGrabber_ISampleGrabber_GetCurrentSample(ISampleGrabber *iface, IMediaSampl static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetCallback(ISampleGrabber *iface, ISampleGrabberCB *cb, LONG whichMethod) { - SG_Impl *This = impl_from_ISampleGrabber(iface); + struct sample_grabber *This = impl_from_ISampleGrabber(iface); TRACE("(%p)->(%p, %u)\n", This, cb, whichMethod); if (This->grabberIface) ISampleGrabberCB_Release(This->grabberIface); @@ -328,19 +328,19 @@ SampleGrabber_ISampleGrabber_SetCallback(ISampleGrabber *iface, ISampleGrabberCB
static HRESULT WINAPI SampleGrabber_IMemInputPin_QueryInterface(IMemInputPin *iface, REFIID iid, void **out) { - SG_Impl *filter = impl_from_IMemInputPin(iface); + struct sample_grabber *filter = impl_from_IMemInputPin(iface); return IPin_QueryInterface(&filter->sink.pin.IPin_iface, iid, out); }
static ULONG WINAPI SampleGrabber_IMemInputPin_AddRef(IMemInputPin *iface) { - SG_Impl *filter = impl_from_IMemInputPin(iface); + struct sample_grabber *filter = impl_from_IMemInputPin(iface); return IPin_AddRef(&filter->sink.pin.IPin_iface); }
static ULONG WINAPI SampleGrabber_IMemInputPin_Release(IMemInputPin *iface) { - SG_Impl *filter = impl_from_IMemInputPin(iface); + struct sample_grabber *filter = impl_from_IMemInputPin(iface); return IPin_Release(&filter->sink.pin.IPin_iface); }
@@ -348,7 +348,7 @@ static ULONG WINAPI SampleGrabber_IMemInputPin_Release(IMemInputPin *iface) static HRESULT WINAPI SampleGrabber_IMemInputPin_GetAllocator(IMemInputPin *iface, IMemAllocator **allocator) { - SG_Impl *This = impl_from_IMemInputPin(iface); + struct sample_grabber *This = impl_from_IMemInputPin(iface); TRACE("(%p)->(%p) allocator = %p\n", This, allocator, This->allocator); if (!allocator) return E_POINTER; @@ -363,7 +363,7 @@ SampleGrabber_IMemInputPin_GetAllocator(IMemInputPin *iface, IMemAllocator **all static HRESULT WINAPI SampleGrabber_IMemInputPin_NotifyAllocator(IMemInputPin *iface, IMemAllocator *allocator, BOOL readOnly) { - SG_Impl *This = impl_from_IMemInputPin(iface); + struct sample_grabber *This = impl_from_IMemInputPin(iface); TRACE("(%p)->(%p, %u) allocator = %p\n", This, allocator, readOnly, This->allocator); if (This->allocator == allocator) return S_OK; @@ -379,7 +379,7 @@ SampleGrabber_IMemInputPin_NotifyAllocator(IMemInputPin *iface, IMemAllocator *a static HRESULT WINAPI SampleGrabber_IMemInputPin_GetAllocatorRequirements(IMemInputPin *iface, ALLOCATOR_PROPERTIES *props) { - SG_Impl *This = impl_from_IMemInputPin(iface); + struct sample_grabber *This = impl_from_IMemInputPin(iface); FIXME("(%p)->(%p): semi-stub\n", This, props); if (!props) return E_POINTER; @@ -390,7 +390,7 @@ SampleGrabber_IMemInputPin_GetAllocatorRequirements(IMemInputPin *iface, ALLOCAT static HRESULT WINAPI SampleGrabber_IMemInputPin_Receive(IMemInputPin *iface, IMediaSample *sample) { - SG_Impl *This = impl_from_IMemInputPin(iface); + struct sample_grabber *This = impl_from_IMemInputPin(iface); HRESULT hr; TRACE("(%p)->(%p) output = %p, grabber = %p\n", This, sample, This->source.pMemInputPin, This->grabberIface); if (!sample) @@ -412,7 +412,7 @@ SampleGrabber_IMemInputPin_Receive(IMemInputPin *iface, IMediaSample *sample) static HRESULT WINAPI SampleGrabber_IMemInputPin_ReceiveMultiple(IMemInputPin *iface, IMediaSample **samples, LONG nSamples, LONG *nProcessed) { - SG_Impl *This = impl_from_IMemInputPin(iface); + struct sample_grabber *This = impl_from_IMemInputPin(iface); LONG idx; TRACE("(%p)->(%p, %u, %p) output = %p, grabber = %p\n", This, samples, nSamples, nProcessed, This->source.pMemInputPin, This->grabberIface); if (!samples || !nProcessed) @@ -428,7 +428,7 @@ SampleGrabber_IMemInputPin_ReceiveMultiple(IMemInputPin *iface, IMediaSample **s static HRESULT WINAPI SampleGrabber_IMemInputPin_ReceiveCanBlock(IMemInputPin *iface) { - SG_Impl *This = impl_from_IMemInputPin(iface); + struct sample_grabber *This = impl_from_IMemInputPin(iface); TRACE("(%p)\n", This); return This->source.pMemInputPin ? IMemInputPin_ReceiveCanBlock(This->source.pMemInputPin) : S_OK; } @@ -460,14 +460,14 @@ static const IMemInputPinVtbl IMemInputPin_VTable = SampleGrabber_IMemInputPin_ReceiveCanBlock, };
-static inline SG_Impl *impl_from_sink_pin(struct strmbase_pin *iface) +static struct sample_grabber *impl_from_sink_pin(struct strmbase_pin *iface) { - return CONTAINING_RECORD(iface, SG_Impl, sink.pin); + return CONTAINING_RECORD(iface, struct sample_grabber, sink.pin); }
static HRESULT sample_grabber_sink_query_interface(struct strmbase_pin *iface, REFIID iid, void **out) { - SG_Impl *filter = impl_from_sink_pin(iface); + struct sample_grabber *filter = impl_from_sink_pin(iface);
if (IsEqualGUID(iid, &IID_IMemInputPin)) *out = &filter->IMemInputPin_iface; @@ -478,7 +478,7 @@ static HRESULT sample_grabber_sink_query_interface(struct strmbase_pin *iface, R return S_OK; }
-static BOOL check_filter_mt(SG_Impl *filter, const AM_MEDIA_TYPE *mt) +static BOOL check_filter_mt(struct sample_grabber *filter, const AM_MEDIA_TYPE *mt) { if (IsEqualGUID(&filter->filter_mt.majortype, &GUID_NULL)) return TRUE; @@ -500,7 +500,7 @@ static BOOL check_filter_mt(SG_Impl *filter, const AM_MEDIA_TYPE *mt)
static HRESULT sample_grabber_sink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt) { - SG_Impl *filter = impl_from_sink_pin(iface); + struct sample_grabber *filter = impl_from_sink_pin(iface);
return check_filter_mt(filter, mt) ? S_OK : S_FALSE; } @@ -508,7 +508,7 @@ static HRESULT sample_grabber_sink_query_accept(struct strmbase_pin *iface, cons static HRESULT sample_grabber_sink_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt) { - SG_Impl *filter = impl_from_sink_pin(iface); + struct sample_grabber *filter = impl_from_sink_pin(iface); IEnumMediaTypes *enummt; AM_MEDIA_TYPE *pmt; HRESULT hr; @@ -539,14 +539,14 @@ static const struct strmbase_sink_ops sink_ops = .base.pin_get_media_type = sample_grabber_sink_get_media_type, };
-static inline SG_Impl *impl_from_source_pin(struct strmbase_pin *iface) +static struct sample_grabber *impl_from_source_pin(struct strmbase_pin *iface) { - return CONTAINING_RECORD(iface, SG_Impl, source.pin); + return CONTAINING_RECORD(iface, struct sample_grabber, source.pin); }
static HRESULT sample_grabber_source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out) { - SG_Impl *filter = impl_from_source_pin(iface); + struct sample_grabber *filter = impl_from_source_pin(iface);
if (IsEqualGUID(iid, &IID_IMediaPosition)) *out = &filter->passthrough.IMediaPosition_iface; @@ -561,7 +561,7 @@ static HRESULT sample_grabber_source_query_interface(struct strmbase_pin *iface,
static HRESULT sample_grabber_source_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt) { - SG_Impl *filter = impl_from_source_pin(iface); + struct sample_grabber *filter = impl_from_source_pin(iface);
if (filter->sink.pin.peer && IPin_QueryAccept(filter->sink.pin.peer, mt) != S_OK) return S_FALSE; @@ -572,7 +572,7 @@ static HRESULT sample_grabber_source_query_accept(struct strmbase_pin *iface, co static HRESULT sample_grabber_source_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt) { - SG_Impl *filter = impl_from_source_pin(iface); + struct sample_grabber *filter = impl_from_source_pin(iface); IEnumMediaTypes *enummt; AM_MEDIA_TYPE *pmt; HRESULT hr; @@ -605,7 +605,7 @@ static inline BOOL compare_media_types(const AM_MEDIA_TYPE *a, const AM_MEDIA_TY static HRESULT WINAPI sample_grabber_source_DecideAllocator(struct strmbase_source *iface, IMemInputPin *peer, IMemAllocator **allocator) { - SG_Impl *filter = impl_from_source_pin(&iface->pin); + struct sample_grabber *filter = impl_from_source_pin(&iface->pin); const AM_MEDIA_TYPE *mt = &iface->pin.mt;
if (!compare_media_types(mt, &filter->sink.pin.mt)) @@ -639,7 +639,7 @@ static const struct strmbase_source_ops source_ops =
HRESULT sample_grabber_create(IUnknown *outer, IUnknown **out) { - SG_Impl *object; + struct sample_grabber *object;
if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qedit/nullrenderer.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/qedit/nullrenderer.c b/dlls/qedit/nullrenderer.c index 9f29ab78283..61de7927505 100644 --- a/dlls/qedit/nullrenderer.c +++ b/dlls/qedit/nullrenderer.c @@ -52,7 +52,7 @@ static void null_renderer_destroy(struct strmbase_renderer *iface) NullRendererImpl *filter = impl_from_strmbase_renderer(iface);
strmbase_renderer_cleanup(&filter->renderer); - CoTaskMemFree(filter); + free(filter); }
static const struct strmbase_renderer_ops renderer_ops = @@ -64,15 +64,14 @@ static const struct strmbase_renderer_ops renderer_ops =
HRESULT null_renderer_create(IUnknown *outer, IUnknown **out) { - NullRendererImpl *pNullRenderer; + NullRendererImpl *object;
- *out = NULL; + if (!(object = calloc(1, sizeof(*object)))) + return E_OUTOFMEMORY;
- pNullRenderer = CoTaskMemAlloc(sizeof(NullRendererImpl)); + strmbase_renderer_init(&object->renderer, outer, &CLSID_NullRenderer, L"In", &renderer_ops);
- strmbase_renderer_init(&pNullRenderer->renderer, outer, - &CLSID_NullRenderer, L"In", &renderer_ops); - - *out = &pNullRenderer->renderer.filter.IUnknown_inner; + TRACE("Created null renderer %p.\n", object); + *out = &object->renderer.filter.IUnknown_inner; return S_OK; }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qedit/nullrenderer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/qedit/nullrenderer.c b/dlls/qedit/nullrenderer.c index 61de7927505..e703ea24305 100644 --- a/dlls/qedit/nullrenderer.c +++ b/dlls/qedit/nullrenderer.c @@ -26,14 +26,14 @@
WINE_DEFAULT_DEBUG_CHANNEL(qedit);
-typedef struct NullRendererImpl +struct null_renderer { struct strmbase_renderer renderer; -} NullRendererImpl; +};
-static inline NullRendererImpl *impl_from_strmbase_renderer(struct strmbase_renderer *iface) +static struct null_renderer *impl_from_strmbase_renderer(struct strmbase_renderer *iface) { - return CONTAINING_RECORD(iface, NullRendererImpl, renderer); + return CONTAINING_RECORD(iface, struct null_renderer, renderer); }
static HRESULT WINAPI NullRenderer_DoRenderSample(struct strmbase_renderer *iface, IMediaSample *sample) @@ -49,7 +49,7 @@ static HRESULT WINAPI NullRenderer_CheckMediaType(struct strmbase_renderer *ifac
static void null_renderer_destroy(struct strmbase_renderer *iface) { - NullRendererImpl *filter = impl_from_strmbase_renderer(iface); + struct null_renderer *filter = impl_from_strmbase_renderer(iface);
strmbase_renderer_cleanup(&filter->renderer); free(filter); @@ -64,7 +64,7 @@ static const struct strmbase_renderer_ops renderer_ops =
HRESULT null_renderer_create(IUnknown *outer, IUnknown **out) { - NullRendererImpl *object; + struct null_renderer *object;
if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/evr/evr.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/evr/evr.c b/dlls/evr/evr.c index d6f6603eaa6..e2caae31d37 100644 --- a/dlls/evr/evr.c +++ b/dlls/evr/evr.c @@ -46,7 +46,7 @@ static void evr_destroy(struct strmbase_renderer *iface) evr_filter *filter = impl_from_strmbase_renderer(iface);
strmbase_renderer_cleanup(&filter->renderer); - CoTaskMemFree(filter); + free(filter); }
static HRESULT WINAPI evr_DoRenderSample(struct strmbase_renderer *iface, IMediaSample *sample) @@ -72,16 +72,13 @@ HRESULT evr_filter_create(IUnknown *outer, void **out) { evr_filter *object;
- *out = NULL; - - object = CoTaskMemAlloc(sizeof(evr_filter)); - if (!object) + if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY;
strmbase_renderer_init(&object->renderer, outer, &CLSID_EnhancedVideoRenderer, L"EVR Input0", &renderer_ops);
+ TRACE("Created EVR %p.\n", object); *out = &object->renderer.filter.IUnknown_inner; - return S_OK; }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/evr/evr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/evr/evr.c b/dlls/evr/evr.c index e2caae31d37..911075de338 100644 --- a/dlls/evr/evr.c +++ b/dlls/evr/evr.c @@ -31,19 +31,19 @@
WINE_DEFAULT_DEBUG_CHANNEL(evr);
-typedef struct +struct evr { struct strmbase_renderer renderer; -} evr_filter; +};
-static inline evr_filter *impl_from_strmbase_renderer(struct strmbase_renderer *iface) +static struct evr *impl_from_strmbase_renderer(struct strmbase_renderer *iface) { - return CONTAINING_RECORD(iface, evr_filter, renderer); + return CONTAINING_RECORD(iface, struct evr, renderer); }
static void evr_destroy(struct strmbase_renderer *iface) { - evr_filter *filter = impl_from_strmbase_renderer(iface); + struct evr *filter = impl_from_strmbase_renderer(iface);
strmbase_renderer_cleanup(&filter->renderer); free(filter); @@ -70,7 +70,7 @@ static const struct strmbase_renderer_ops renderer_ops =
HRESULT evr_filter_create(IUnknown *outer, void **out) { - evr_filter *object; + struct evr *object;
if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68501
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/qedit/samplegrabber.c:107 Task: Patch failed to apply
On 3/30/20 6:19 PM, Marvin wrote:
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68501
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/qedit/samplegrabber.c:107 Task: Patch failed to apply
Eh, I submitted this one before the testbot updated, so it should apply fine. Sorry about the noise.