diff --git a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c index 396a1aeabf..974180b8bd 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c @@ -899,37 +899,6 @@ decode_pad_set_target (GstGhostPad * pad, GstPad * target) return res; } -typedef struct -{ - gboolean ret; - GstPad *peer; -} SendStickyEventsData; - -static gboolean -send_sticky_event (GstPad * pad, GstEvent ** event, gpointer user_data) -{ - SendStickyEventsData *data = user_data; - - data->ret &= gst_pad_send_event (data->peer, gst_event_ref (*event)); - - return data->ret; -} - -static gboolean -send_sticky_events (GstDecodebin3 * dbin, GstPad * pad) -{ - SendStickyEventsData data; - - data.ret = TRUE; - data.peer = gst_pad_get_peer (pad); - - gst_pad_sticky_events_foreach (pad, send_sticky_event, &data); - - gst_object_unref (data.peer); - - return data.ret; -} - static CandidateDecoder * add_candidate_decoder (GstDecodebin3 * dbin, GstElement * element) { @@ -3008,24 +2977,14 @@ reconfigure_output_stream (DecodebinOutputStream * output, goto try_next; } - /* First lock element's sinkpad stream lock so no data reaches - * the possible new element added when caps are sent by element - * while we're still sending sticky events */ - GST_PAD_STREAM_LOCK (output->decoder_sink); - if (gst_element_set_state (output->decoder, - GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE || - !send_sticky_events (dbin, slot->src_pad)) { - - GST_PAD_STREAM_UNLOCK (output->decoder_sink); - GST_WARNING_OBJECT (dbin, - "Decoder '%s' failed to reach PAUSED state", + GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE) { + GST_WARNING_OBJECT (dbin, "Decoder '%s' failed to reach PAUSED state", GST_ELEMENT_NAME (output->decoder)); decoder_failed = TRUE; goto try_next; } else { /* Everything went well */ - GST_PAD_STREAM_UNLOCK (output->decoder_sink); output->linked = TRUE; GST_DEBUG ("created decoder %" GST_PTR_FORMAT, output->decoder);