Commit 9147fefb authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Move wg_parser_destroy() to the Unix library.

parent 10dde32d
......@@ -210,6 +210,7 @@ struct unix_funcs
struct wg_parser *(CDECL *wg_avi_parser_create)(void);
struct wg_parser *(CDECL *wg_mpeg_audio_parser_create)(void);
struct wg_parser *(CDECL *wg_wave_parser_create)(void);
void (CDECL *wg_parser_destroy)(struct wg_parser *parser);
};
extern const struct unix_funcs *unix_funcs;
......
......@@ -1225,22 +1225,6 @@ static struct strmbase_pin *parser_get_pin(struct strmbase_filter *base, unsigne
return NULL;
}
static void wg_parser_destroy(struct wg_parser *parser)
{
if (parser->bus)
{
gst_bus_set_sync_handler(parser->bus, NULL, NULL, NULL);
gst_object_unref(parser->bus);
}
pthread_mutex_destroy(&parser->mutex);
pthread_cond_destroy(&parser->init_cond);
pthread_cond_destroy(&parser->read_cond);
pthread_cond_destroy(&parser->read_done_cond);
free(parser);
}
static void parser_destroy(struct strmbase_filter *iface)
{
struct parser *filter = impl_from_strmbase_filter(iface);
......@@ -1259,7 +1243,7 @@ static void parser_destroy(struct strmbase_filter *iface)
IAsyncReader_Release(filter->reader);
filter->reader = NULL;
wg_parser_destroy(filter->wg_parser);
unix_funcs->wg_parser_destroy(filter->wg_parser);
strmbase_sink_cleanup(&filter->sink);
strmbase_filter_cleanup(&filter->filter);
......
......@@ -1011,12 +1011,29 @@ static struct wg_parser * CDECL wg_wave_parser_create(void)
return parser;
}
static void CDECL wg_parser_destroy(struct wg_parser *parser)
{
if (parser->bus)
{
gst_bus_set_sync_handler(parser->bus, NULL, NULL, NULL);
gst_object_unref(parser->bus);
}
pthread_mutex_destroy(&parser->mutex);
pthread_cond_destroy(&parser->init_cond);
pthread_cond_destroy(&parser->read_cond);
pthread_cond_destroy(&parser->read_done_cond);
free(parser);
}
static const struct unix_funcs funcs =
{
wg_decodebin_parser_create,
wg_avi_parser_create,
wg_mpeg_audio_parser_create,
wg_wave_parser_create,
wg_parser_destroy,
};
NTSTATUS CDECL __wine_init_unix_lib(HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out)
......
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