mf: Make freeing function optional for object activator.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-07-07 14:40:11 +03:00 committed by Alexandre Julliard
parent 4cd2ca96c2
commit 3a973ca827
3 changed files with 6 additions and 15 deletions

View File

@ -258,15 +258,10 @@ static void evr_shutdown_object(void *user_context, IUnknown *obj)
}
}
static void evr_free_private(void *user_context)
{
}
static const struct activate_funcs evr_activate_funcs =
{
evr_create_object,
evr_shutdown_object,
evr_free_private,
.create_object = evr_create_object,
.shutdown_object = evr_shutdown_object,
};
/***********************************************************************

View File

@ -91,7 +91,8 @@ static ULONG WINAPI activate_object_Release(IMFActivate *iface)
if (!refcount)
{
activate->funcs->free_private(activate->context);
if (activate->funcs->free_private)
activate->funcs->free_private(activate->context);
if (activate->object)
IUnknown_Release(activate->object);
IMFAttributes_Release(activate->attributes);

View File

@ -1891,15 +1891,10 @@ static void sar_shutdown_object(void *user_context, IUnknown *obj)
}
}
static void sar_free_private(void *user_context)
{
}
static const struct activate_funcs sar_activate_funcs =
{
sar_create_object,
sar_shutdown_object,
sar_free_private,
.create_object = sar_create_object,
.shutdown_object = sar_shutdown_object,
};
/***********************************************************************