diff --git a/ChangeLog b/ChangeLog index b56aed7380..32f96b59b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-11 Wim Taymans + + * 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 * gst-libs/gst/audio/gstbaseaudiosink.c: diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 8ea191bc88..a81e7fcb54 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -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.