uridecodebin: Pass through NO_PREROLL state change returns

Fixes playback of live pipelines.
This commit is contained in:
Sebastian Dröge 2014-07-28 16:55:17 +02:00
parent 1ed192abb0
commit f3f55e1758

View file

@ -2747,11 +2747,19 @@ gst_uri_decode_bin_change_state (GstElement * element,
g_slist_foreach (decoder->decodebins,
(GFunc) gst_element_sync_state_with_parent, NULL);
if (decoder->typefind)
gst_element_sync_state_with_parent (decoder->typefind);
ret = gst_element_set_state (decoder->typefind, GST_STATE_PAUSED);
if (ret == GST_STATE_CHANGE_FAILURE)
goto setup_failed;
if (decoder->queue)
gst_element_sync_state_with_parent (decoder->queue);
ret = gst_element_set_state (decoder->queue, GST_STATE_PAUSED);
if (ret == GST_STATE_CHANGE_FAILURE)
goto setup_failed;
if (decoder->source)
gst_element_sync_state_with_parent (decoder->source);
ret = gst_element_set_state (decoder->source, GST_STATE_PAUSED);
if (ret == GST_STATE_CHANGE_FAILURE)
goto setup_failed;
if (ret == GST_STATE_CHANGE_SUCCESS)
ret = GST_STATE_CHANGE_ASYNC;
break;
case GST_STATE_CHANGE_PAUSED_TO_READY: