mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
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.
This commit is contained in:
parent
a67d745de2
commit
5bf3c92462
1 changed files with 4 additions and 5 deletions
|
@ -5442,11 +5442,6 @@ gst_play_bin_change_state (GstElement * element, GstStateChange transition)
|
||||||
GST_LOG_OBJECT (playbin, "clearing shutdown flag");
|
GST_LOG_OBJECT (playbin, "clearing shutdown flag");
|
||||||
memset (&playbin->duration, 0, sizeof (playbin->duration));
|
memset (&playbin->duration, 0, sizeof (playbin->duration));
|
||||||
g_atomic_int_set (&playbin->shutdown, 0);
|
g_atomic_int_set (&playbin->shutdown, 0);
|
||||||
|
|
||||||
if (!setup_next_source (playbin, GST_STATE_READY)) {
|
|
||||||
ret = GST_STATE_CHANGE_FAILURE;
|
|
||||||
goto failure;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
async_down:
|
async_down:
|
||||||
|
@ -5486,6 +5481,10 @@ gst_play_bin_change_state (GstElement * element, GstStateChange transition)
|
||||||
|
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
|
if (!setup_next_source (playbin, GST_STATE_PAUSED)) {
|
||||||
|
ret = GST_STATE_CHANGE_FAILURE;
|
||||||
|
goto failure;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
|
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
|
||||||
/* FIXME Release audio device when we implement that */
|
/* FIXME Release audio device when we implement that */
|
||||||
|
|
Loading…
Reference in a new issue