From 5bf3c924625275781fbdaa5aa516162566e62c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 15 Jul 2014 17:20:05 +0200 Subject: [PATCH] playbin: Create new sources after chaining up to the parent class Otherwise we start the new sources already before the parent class got ready to start. --- gst/playback/gstplaybin2.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 8fed37f78a..23801292a9 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -5442,11 +5442,6 @@ gst_play_bin_change_state (GstElement * element, GstStateChange transition) GST_LOG_OBJECT (playbin, "clearing shutdown flag"); memset (&playbin->duration, 0, sizeof (playbin->duration)); g_atomic_int_set (&playbin->shutdown, 0); - - if (!setup_next_source (playbin, GST_STATE_READY)) { - ret = GST_STATE_CHANGE_FAILURE; - goto failure; - } break; case GST_STATE_CHANGE_PAUSED_TO_READY: async_down: @@ -5486,6 +5481,10 @@ gst_play_bin_change_state (GstElement * element, GstStateChange transition) switch (transition) { case GST_STATE_CHANGE_READY_TO_PAUSED: + if (!setup_next_source (playbin, GST_STATE_PAUSED)) { + ret = GST_STATE_CHANGE_FAILURE; + goto failure; + } break; case GST_STATE_CHANGE_PLAYING_TO_PAUSED: /* FIXME Release audio device when we implement that */