nlecomposition: Always execute seeks
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 7 Sep 2017 16:08:40 +0000 (12:08 -0400)
committerThibault Saunier <thibault.saunier@osg.samsung.com>
Tue, 19 Sep 2017 14:24:22 +0000 (11:24 -0300)
We have an optiominisation to avoid double seeks when a seek is passed
the end of the current stack. The problem, is that we no longer flush
the pipeline when this code is reached. This patch comments out this
optimization adding a FIXME. As mention, flushing the stack instead of
seeking would work, but does not seem trivial considering all the
mechanic inplace to forward or not the events.

https://bugzilla.gnome.org/show_bug.cgi?id=787405

plugins/nle/nlecomposition.c

index 61159cb18817181a9ec2a675042c94dad0a741c5..151ddc0f8e522c106a0e1d422e0a405c850b42b5 100644 (file)
@@ -552,6 +552,10 @@ _seek_pipeline_func (NleComposition * comp, SeekData * seekd)
   GST_DEBUG_OBJECT (seekd->comp, "Segment now has flags:%d",
       priv->segment->flags);
 
+  /* FIXME: The idea was to avoid seeking on a stack if we know we will endup
+   * passed the end, but then we loose the flush, wich leads to hangs. Long
+   * term, we should just flush the stack instead to avoid the double seek. */
+#if 0
   if (priv->segment->start >= NLE_OBJECT_STOP (seekd->comp)) {
     GST_INFO_OBJECT (seekd->comp,
         "Start %" GST_TIME_FORMAT " > comp->stop: %" GST_TIME_FORMAT
@@ -560,6 +564,7 @@ _seek_pipeline_func (NleComposition * comp, SeekData * seekd)
     GST_FIXME_OBJECT (seekd->comp, "HANDLE error async!");
     return;
   }
+#endif
 
   _post_start_composition_update (seekd->comp,
       gst_event_get_seqnum (seekd->event), COMP_UPDATE_STACK_ON_SEEK);