basesrc: Don't hold the object lock while pushing an event

Release the object lock before pushing a segment event.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4951>
This commit is contained in:
Jan Schmidt 2023-07-01 00:33:56 +10:00 committed by GStreamer Marge Bot
parent 1f18ceaf0f
commit 0461103965

View file

@ -4195,12 +4195,12 @@ gst_base_src_push_segment (GstBaseSrc * src, const GstSegment * segment)
src->priv->segment_pending = FALSE; src->priv->segment_pending = FALSE;
src->priv->segment_seqnum = gst_util_seqnum_next (); src->priv->segment_seqnum = gst_util_seqnum_next ();
gst_event_set_seqnum (seg_event, src->priv->segment_seqnum); gst_event_set_seqnum (seg_event, src->priv->segment_seqnum);
gst_pad_push_event (src->srcpad, seg_event);
GST_DEBUG_OBJECT (src, "Sending new segment %" GST_SEGMENT_FORMAT, segment);
GST_OBJECT_UNLOCK (src); GST_OBJECT_UNLOCK (src);
GST_DEBUG_OBJECT (src, "Sending new segment %" GST_SEGMENT_FORMAT, segment);
gst_pad_push_event (src->srcpad, seg_event);
src->running = TRUE; src->running = TRUE;
return TRUE; return TRUE;