element: don't touch base_time or clock in state change

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.
This commit is contained in:
Wim Taymans 2011-04-20 19:00:07 +02:00
parent 4db7fc58d2
commit 9ccd6b1134

View 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;