mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
concat: Forward FLUSH_START and FLUSH_STOP events
Without this, seeking deadlocks if performed while the pipeline is paused. Only flush events coming from the active pad are forwarded. https://bugzilla.gnome.org/show_bug.cgi?id=745366
This commit is contained in:
parent
d06fdf157a
commit
426a6ea644
1 changed files with 14 additions and 0 deletions
|
@ -504,15 +504,29 @@ gst_concat_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GST_EVENT_FLUSH_START:{
|
case GST_EVENT_FLUSH_START:{
|
||||||
|
gboolean forward;
|
||||||
g_mutex_lock (&self->lock);
|
g_mutex_lock (&self->lock);
|
||||||
spad->flushing = TRUE;
|
spad->flushing = TRUE;
|
||||||
g_cond_broadcast (&self->cond);
|
g_cond_broadcast (&self->cond);
|
||||||
|
forward = (self->current_sinkpad == GST_PAD_CAST (spad));
|
||||||
g_mutex_unlock (&self->lock);
|
g_mutex_unlock (&self->lock);
|
||||||
|
if (forward)
|
||||||
|
ret = gst_pad_event_default (pad, parent, event);
|
||||||
|
else
|
||||||
|
gst_event_unref (event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GST_EVENT_FLUSH_STOP:{
|
case GST_EVENT_FLUSH_STOP:{
|
||||||
|
gboolean forward;
|
||||||
gst_segment_init (&spad->segment, GST_FORMAT_UNDEFINED);
|
gst_segment_init (&spad->segment, GST_FORMAT_UNDEFINED);
|
||||||
spad->flushing = FALSE;
|
spad->flushing = FALSE;
|
||||||
|
g_mutex_lock (&self->lock);
|
||||||
|
forward = (self->current_sinkpad == GST_PAD_CAST (spad));
|
||||||
|
g_mutex_unlock (&self->lock);
|
||||||
|
if (forward)
|
||||||
|
ret = gst_pad_event_default (pad, parent, event);
|
||||||
|
else
|
||||||
|
gst_event_unref (event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:{
|
default:{
|
||||||
|
|
Loading…
Reference in a new issue