pipeline: only have a top-level pipeline do pipeline management
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 2 Dec 2011 13:10:32 +0000 (14:10 +0100)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 22 Dec 2011 11:31:36 +0000 (12:31 +0100)
Fixes #665390.

gst/gstpipeline.c

index b032c2f..8612ae3 100644 (file)
@@ -408,7 +408,9 @@ gst_pipeline_change_state (GstElement * element, GstStateChange transition)
 
       /* running time changed, either with a PAUSED or a flush, we need to check
        * if there is a new clock & update the base time */
-      if (update_clock || last_start_time != start_time) {
+      /* only do this for top-level, however */
+      if (GST_OBJECT_PARENT (element) == NULL &&
+          (update_clock || last_start_time != start_time)) {
         GST_DEBUG_OBJECT (pipeline, "Need to update start_time");
 
         /* when going to PLAYING, select a clock when needed. If we just got