winegstreamer: Don't replace internal bus.

Don't replace the bus on the decodebin inside our container, as it
causes problems with internal GStreamer element management.

Put the bus only on the top-level container.

Signed-off-by: Jan Schmidt <jan@centricular.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jan Schmidt 2016-07-17 14:58:19 +10:00 committed by Alexandre Julliard
parent f000189b8a
commit 22bdf77486
1 changed files with 2 additions and 2 deletions

View File

@ -1103,6 +1103,7 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI
}
This->container = gst_bin_new(NULL);
gst_element_set_bus(This->container, This->bus);
This->gstfilter = gst_element_factory_make("decodebin", NULL);
if (!This->gstfilter) {
@ -1113,7 +1114,6 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI
gst_bin_add(GST_BIN(This->container), This->gstfilter);
gst_element_set_bus(This->gstfilter, This->bus);
g_signal_connect(This->gstfilter, "pad-added", G_CALLBACK(existing_new_pad_wrapper), This);
g_signal_connect(This->gstfilter, "pad-removed", G_CALLBACK(removed_decoded_pad_wrapper), This);
g_signal_connect(This->gstfilter, "autoplug-select", G_CALLBACK(autoplug_blacklist_wrapper), This);
@ -1902,7 +1902,6 @@ static HRESULT GST_RemoveOutputPins(GSTImpl *This)
if (!This->container)
return S_OK;
gst_element_set_bus(This->gstfilter, NULL);
gst_element_set_state(This->container, GST_STATE_NULL);
gst_pad_unlink(This->my_src, This->their_sink);
gst_object_unref(This->my_src);
@ -1918,6 +1917,7 @@ static HRESULT GST_RemoveOutputPins(GSTImpl *This)
This->ppPins = NULL;
gst_object_unref(This->gstfilter);
This->gstfilter = NULL;
gst_element_set_bus(This->container, NULL);
gst_object_unref(This->container);
This->container = NULL;
BaseFilterImpl_IncrementPinVersion((BaseFilter*)This);