element: don't touch base_time or clock in state change
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 20 Apr 2011 17:00:07 +0000 (19:00 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 20 Apr 2011 17:03:16 +0000 (19:03 +0200)
Don't touch the base_time or the clock when setting an element to the READY or
NULL state. It is the parent that will manage this for us.

gst/gstelement.c

index 2e8028b..3ac4eef 100644 (file)
@@ -2882,15 +2882,7 @@ gst_element_change_state_func (GstElement * element, GstStateChange transition)
          ready->paused but the element might not have made it to paused */
       if (!gst_element_pads_activate (element, FALSE)) {
         result = GST_STATE_CHANGE_FAILURE;
-      } else {
-        gst_element_set_base_time (element, 0);
       }
-
-      /* In null state release the reference to the clock */
-      GST_OBJECT_LOCK (element);
-      clock_p = &element->clock;
-      gst_object_replace ((GstObject **) clock_p, NULL);
-      GST_OBJECT_UNLOCK (element);
       break;
     default:
       /* this will catch real but unhandled state changes;