composition: simplify update_pipeline_func

This commit is contained in:
Mathieu Duponchelle 2014-06-27 15:00:48 +02:00 committed by Thibault Saunier
parent 9c10aa34d1
commit 13ae2cecd3

View file

@ -1881,13 +1881,8 @@ update_pipeline_func (GnlComposition * comp)
seek_handling (comp, TRUE, TRUE); seek_handling (comp, TRUE, TRUE);
if (!priv->current) { /* Post segment done if last seek was a segment seek */
/* If we're at the end, post SEGMENT_DONE, or push EOS */ if (!priv->current && (priv->segment->flags & GST_SEEK_FLAG_SEGMENT)) {
GST_DEBUG_OBJECT (comp, "Nothing else to play");
if (!(priv->segment->flags & GST_SEEK_FLAG_SEGMENT)) {
GST_DEBUG_OBJECT (comp, "Real EOS should be sent now");
} else if (priv->segment->flags & GST_SEEK_FLAG_SEGMENT) {
gint64 epos; gint64 epos;
if (GST_CLOCK_TIME_IS_VALID (priv->segment->stop)) if (GST_CLOCK_TIME_IS_VALID (priv->segment->stop))
@ -1903,7 +1898,6 @@ update_pipeline_func (GnlComposition * comp)
gst_pad_push_event (GNL_OBJECT (comp)->srcpad, gst_pad_push_event (GNL_OBJECT (comp)->srcpad,
gst_event_new_segment_done (priv->segment->format, epos)); gst_event_new_segment_done (priv->segment->format, epos));
} }
}
return G_SOURCE_REMOVE; return G_SOURCE_REMOVE;