Hi Zebediah,
On 06/22/2018 08:06 PM, Zebediah Figura wrote:
-static HRESULT create_mp3_decoder(REFIID iid, void **obj) +static HRESULT create_mp3_decoder(IUnknown *outer, REFIID iid, void **obj) { struct mp3_decoder *This; int err; @@ -424,15 +457,17 @@ static HRESULT create_mp3_decoder(REFIID iid, void **obj) if (!(This = heap_alloc_zero(sizeof(*This)))) return E_OUTOFMEMORY;
- This->IMediaObject_iface.lpVtbl = &IMediaObject_vtbl;
This->IUnknown_inner.lpVtbl = &Unknown_vtbl;
This->IMediaObject_iface.lpVtbl = &MediaObject_vtbl; This->ref = 0;
This->outer = outer ? outer : &This->IUnknown_inner;
mpg123_init(); This->mh = mpg123_new(NULL, &err); mpg123_open_feed(This->mh); mpg123_format_none(This->mh);
- return IMediaObject_QueryInterface(&This->IMediaObject_iface, iid, obj);
- return IUnknown_QueryInterface(&This->IUnknown_inner, iid, obj);
This leaks in non-aggregated case if QueryInterface fails.
Jacek