pipeline: Reset start time in READY->PAUSED before chaining up
authorSebastian Dröge <sebastian@centricular.com>
Tue, 15 Jul 2014 15:19:10 +0000 (17:19 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 21 Jul 2014 07:33:54 +0000 (09:33 +0200)
Otherwise bin will change the state of the child elements without
distributing the new start time.

gst/gstpipeline.c

index 21e0620..d0ddf93 100644 (file)
@@ -365,6 +365,9 @@ gst_pipeline_change_state (GstElement * element, GstStateChange transition)
       GST_OBJECT_LOCK (element);
       pipeline->priv->update_clock = TRUE;
       GST_OBJECT_UNLOCK (element);
+
+      /* READY to PAUSED starts running_time from 0 */
+      reset_start_time (pipeline, 0);
       break;
     case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
     {
@@ -472,11 +475,7 @@ gst_pipeline_change_state (GstElement * element, GstStateChange transition)
     case GST_STATE_CHANGE_NULL_TO_READY:
       break;
     case GST_STATE_CHANGE_READY_TO_PAUSED:
-    {
-      /* READY to PAUSED starts running_time from 0 */
-      reset_start_time (pipeline, 0);
       break;
-    }
     case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
       break;
     case GST_STATE_CHANGE_PLAYING_TO_PAUSED: