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:
Carlos Rafael Giani 2015-03-28 16:46:32 +01:00 committed by Sebastian Dröge
parent d06fdf157a
commit 426a6ea644

View file

@ -504,15 +504,29 @@ gst_concat_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
break;
}
case GST_EVENT_FLUSH_START:{
gboolean forward;
g_mutex_lock (&self->lock);
spad->flushing = TRUE;
g_cond_broadcast (&self->cond);
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;
}
case GST_EVENT_FLUSH_STOP:{
gboolean forward;
gst_segment_init (&spad->segment, GST_FORMAT_UNDEFINED);
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;
}
default:{