mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
streamcombiner: Fix locking
We have to hold the streams-lock when iterating over all pads, also the stream-lock of the pad is already locked when we receive EOS. Call gst_pad_event_default() for the correct default handling of events.
This commit is contained in:
parent
2f8b0f1e34
commit
9bd140d3b7
1 changed files with 3 additions and 5 deletions
|
@ -138,8 +138,7 @@ gst_stream_combiner_sink_event (GstPad * pad, GstObject * parent,
|
|||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_EOS:
|
||||
GST_PAD_STREAM_LOCK (pad);
|
||||
|
||||
STREAMS_LOCK (stream_combiner);
|
||||
combiner_pad->is_eos = TRUE;
|
||||
if (!_all_sink_pads_eos (stream_combiner)) {
|
||||
gst_event_unref (event);
|
||||
|
@ -147,8 +146,7 @@ gst_stream_combiner_sink_event (GstPad * pad, GstObject * parent,
|
|||
} else {
|
||||
GST_DEBUG_OBJECT (stream_combiner, "All sink pads eos, pushing eos");
|
||||
}
|
||||
|
||||
GST_PAD_STREAM_UNLOCK (pad);
|
||||
STREAMS_UNLOCK (stream_combiner);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -159,7 +157,7 @@ gst_stream_combiner_sink_event (GstPad * pad, GstObject * parent,
|
|||
/* FLUSH_STOP : lock, unmark as flushing, unlock, if was flushing forward */
|
||||
/* OTHER : if selected pad forward */
|
||||
if (event)
|
||||
return gst_pad_push_event (stream_combiner->srcpad, event);
|
||||
return gst_pad_event_default (pad, parent, event);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue