Commit 12965264 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase/renderer: Add a destructor callback.

parent e2194b93
......@@ -194,6 +194,18 @@ static IPin *renderer_get_pin(BaseFilter *iface, unsigned int index)
return &This->pInputPin->pin.IPin_iface;
}
static void renderer_destroy(BaseFilter *iface)
{
BaseRenderer *filter = impl_from_BaseFilter(iface);
filter->pFuncsTable->renderer_destroy(filter);
}
static const BaseFilterFuncTable RendererBaseFilterFuncTable =
{
.filter_get_pin = renderer_get_pin,
.filter_destroy = renderer_destroy,
};
static HRESULT WINAPI BaseRenderer_Input_CheckMediaType(BasePin *pin, const AM_MEDIA_TYPE * pmt)
{
BaseRenderer *This = impl_from_IBaseFilter(pin->pinInfo.pFilter);
......@@ -206,10 +218,6 @@ static HRESULT WINAPI BaseRenderer_Receive(BaseInputPin *pin, IMediaSample * pSa
return BaseRendererImpl_Receive(This, pSample);
}
static const BaseFilterFuncTable RendererBaseFilterFuncTable = {
.filter_get_pin = renderer_get_pin,
};
static const BaseInputPinFuncTable input_BaseInputFuncTable = {
{
BaseRenderer_Input_CheckMediaType,
......
......@@ -604,6 +604,7 @@ typedef struct BaseRendererFuncTable {
BaseRenderer_EndOfStream pfnEndOfStream;
BaseRenderer_BeginFlush pfnBeginFlush;
BaseRenderer_EndFlush pfnEndFlush;
void (*renderer_destroy)(BaseRenderer *iface);
} BaseRendererFuncTable;
HRESULT WINAPI BaseRendererImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv);
......
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