nlecomposition: update base time before seeking current stack.
authorMathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Fri, 26 Sep 2014 16:28:16 +0000 (18:28 +0200)
committerThibault Saunier <tsaunier@gnome.org>
Mon, 10 Nov 2014 15:22:39 +0000 (16:22 +0100)
There could be a race where the new segments were pushed after
a seek on some / all pads before the operation had had its basetime
updated, and thus incoming segments were tweaked wrongly.

Reproducible with 3 clips composited and multiple seeks,
FIXME hard to validate.

ges/nle/nlecomposition.c

index f7aff0c..4ccc933 100644 (file)
@@ -1477,9 +1477,9 @@ seek_handling (NleComposition * comp, gint32 seqnum,
     _set_real_eos_seqnum_from_seek (comp, toplevel_seek);
 
     _remove_update_actions (comp);
+    update_operations_base_time (comp, !(comp->priv->segment->rate >= 0.0));
     _seek_current_stack (comp, toplevel_seek,
         _have_to_flush_downstream (update_stack_reason));
-    update_operations_base_time (comp, !(comp->priv->segment->rate >= 0.0));
   }
 
   return TRUE;