pipeline: Reset start time in READY->PAUSED before chaining up

Otherwise bin will change the state of the child elements without
distributing the new start time.
This commit is contained in:
Sebastian Dröge 2014-07-15 17:19:10 +02:00
parent a2ca5007bd
commit aa6aaa42a8

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