gst/playback/gstplaybin2.c: Catch state change errors and stop from the uridecodebin elements instead of trying to co...

Original commit message from CVS:
* gst/playback/gstplaybin2.c: (activate_group):
Catch state change errors and stop from the uridecodebin elements
instead of trying to continue in vain.
This commit is contained in:
Wim Taymans 2008-11-11 15:52:14 +00:00
parent dfa2705aa0
commit 79199d884f
2 changed files with 24 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2008-11-11 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/playback/gstplaybin2.c: (activate_group):
Catch state change errors and stop from the uridecodebin elements
instead of trying to continue in vain.
2008-11-10 Wim Taymans <wim.taymans@collabora.co.uk>
* gst-libs/gst/audio/gstbaseaudiosink.c:

View file

@ -2056,9 +2056,13 @@ activate_group (GstPlayBin * playbin, GstSourceGroup * group)
/* we have 2 pending no-more-pads */
group->pending = 2;
gst_element_set_state (suburidecodebin, GST_STATE_PAUSED);
if (gst_element_set_state (suburidecodebin,
GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE)
goto suburidecodebin_failure;
}
gst_element_set_state (uridecodebin, GST_STATE_PAUSED);
if (gst_element_set_state (uridecodebin,
GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE)
goto uridecodebin_failure;
group->active = TRUE;
GST_SOURCE_GROUP_UNLOCK (group);
@ -2071,6 +2075,18 @@ no_decodebin:
GST_SOURCE_GROUP_UNLOCK (group);
return FALSE;
}
suburidecodebin_failure:
{
GST_DEBUG_OBJECT (playbin, "failed state change of subtitle uridecodebin");
GST_SOURCE_GROUP_UNLOCK (group);
return FALSE;
}
uridecodebin_failure:
{
GST_DEBUG_OBJECT (playbin, "failed state change of uridecodebin");
GST_SOURCE_GROUP_UNLOCK (group);
return FALSE;
}
}
/* unlink a group of uridecodebins from the sink.