From 3d7486d66b93dc749113300a004182de4ac72d28 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Sat, 23 Jan 2021 12:43:47 -0600 Subject: [PATCH] winegstreamer: Don't force got_data_sink() onto a Wine thread. Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/winegstreamer/gst_cbs.c | 13 ------------- dlls/winegstreamer/gst_cbs.h | 8 -------- dlls/winegstreamer/gstdemux.c | 8 +------- 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/dlls/winegstreamer/gst_cbs.c b/dlls/winegstreamer/gst_cbs.c index ebef533779d..5b163e40201 100644 --- a/dlls/winegstreamer/gst_cbs.c +++ b/dlls/winegstreamer/gst_cbs.c @@ -216,19 +216,6 @@ gboolean event_sink_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) return cbdata.u.event_sink_data.ret; } -GstFlowReturn got_data_sink_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) -{ - struct cb_data cbdata = { GOT_DATA_SINK }; - - cbdata.u.got_data_sink_data.pad = pad; - cbdata.u.got_data_sink_data.parent = parent; - cbdata.u.got_data_sink_data.buf = buf; - - call_cb(&cbdata); - - return cbdata.u.got_data_sink_data.ret; -} - void removed_decoded_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) { struct cb_data cbdata = { REMOVED_DECODED_PAD }; diff --git a/dlls/winegstreamer/gst_cbs.h b/dlls/winegstreamer/gst_cbs.h index ce74e76edae..2de829f72e3 100644 --- a/dlls/winegstreamer/gst_cbs.h +++ b/dlls/winegstreamer/gst_cbs.h @@ -36,7 +36,6 @@ enum CB_TYPE { REQUEST_BUFFER_SRC, EVENT_SRC, EVENT_SINK, - GOT_DATA_SINK, REMOVED_DECODED_PAD, QUERY_SINK, GSTDEMUX_MAX, @@ -102,12 +101,6 @@ struct cb_data { GstEvent *event; gboolean ret; } event_sink_data; - struct got_data_sink_data { - GstPad *pad; - GstObject *parent; - GstBuffer *buf; - GstFlowReturn ret; - } got_data_sink_data; struct pad_removed_data { GstElement *element; GstPad *pad; @@ -137,7 +130,6 @@ gboolean activate_mode_wrapper(GstPad *pad, GstObject *parent, GstPadMode mode, GstFlowReturn request_buffer_src_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len, GstBuffer **buf) DECLSPEC_HIDDEN; gboolean event_src_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN; gboolean event_sink_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN; -GstFlowReturn got_data_sink_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN; GstFlowReturn got_data_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN; void removed_decoded_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN; void Gstreamer_transform_pad_added_wrapper(GstElement *filter, GstPad *pad, gpointer user) DECLSPEC_HIDDEN; diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index f51137344f9..5401d942a41 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -2378,7 +2378,7 @@ static struct parser_source *create_pin(struct parser *filter, const WCHAR *name sprintf(pad_name, "qz_sink_%u", filter->source_count); pin->my_sink = gst_pad_new(pad_name, GST_PAD_SINK); gst_pad_set_element_private(pin->my_sink, pin); - gst_pad_set_chain_function(pin->my_sink, got_data_sink_wrapper); + gst_pad_set_chain_function(pin->my_sink, got_data_sink); gst_pad_set_event_function(pin->my_sink, event_sink_wrapper); gst_pad_set_query_function(pin->my_sink, query_sink_wrapper); @@ -2465,12 +2465,6 @@ void perform_cb_gstdemux(struct cb_data *cbdata) cbdata->u.event_sink_data.ret = event_sink(data->pad, data->parent, data->event); break; } - case GOT_DATA_SINK: - { - struct got_data_sink_data *data = &cbdata->u.got_data_sink_data; - cbdata->u.got_data_sink_data.ret = got_data_sink(data->pad, data->parent, data->buf); - break; - } case REMOVED_DECODED_PAD: { struct pad_removed_data *data = &cbdata->u.pad_removed_data;