element: only clear negotiable when going to NULL

Don't clear the negotiable flag when going to READY because then it will never
be set to TRUE again.
This commit is contained in:
Wim Taymans 2010-06-14 18:07:23 +02:00
parent 8e92cb4a7d
commit 8f5ec1f737

View file

@ -2834,13 +2834,15 @@ gst_element_change_state_func (GstElement * element, GstStateChange transition)
} else {
gst_element_set_base_time (element, 0);
}
gst_element_pads_negotiable (element, FALSE);
/* 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);
/* only clear negotiable when going to NULL */
if (transition == GST_STATE_CHANGE_READY_TO_NULL)
gst_element_pads_negotiable (element, FALSE);
break;
default:
/* this will catch real but unhandled state changes;