summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-10-24 13:07:45 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-10-24 13:07:45 +0200
commit497d0a479363191fb6b455c96687fb02120657b1 (patch)
treedf7044f23426d3377c009d419171fde142e2ad39
parentcd5475aa6f52438e0239ef54b8b8d6bd0f372e27 (diff)
playbin2: If setting the state of the suburidecodebin fails just warn, don't error out
-rw-r--r--gst/playback/gstplaybin2.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c
index 50ca979f1..dc3248434 100644
--- a/gst/playback/gstplaybin2.c
+++ b/gst/playback/gstplaybin2.c
@@ -2711,8 +2711,21 @@ activate_group (GstPlayBin * playbin, GstSourceGroup * group, GstState target)
if (suburidecodebin) {
if (gst_element_set_state (suburidecodebin,
- target) == GST_STATE_CHANGE_FAILURE)
- goto suburidecodebin_failure;
+ target) == GST_STATE_CHANGE_FAILURE) {
+ GST_DEBUG_OBJECT (playbin,
+ "failed state change of subtitle uridecodebin");
+ GST_SOURCE_GROUP_LOCK (group);
+
+ REMOVE_SIGNAL (group->suburidecodebin, group->sub_pad_added_id);
+ REMOVE_SIGNAL (group->suburidecodebin, group->sub_pad_removed_id);
+ REMOVE_SIGNAL (group->suburidecodebin, group->sub_no_more_pads_id);
+ /* Might already be removed because of an error message */
+ if (GST_OBJECT_PARENT (suburidecodebin) == GST_OBJECT_CAST (playbin))
+ gst_bin_remove (GST_BIN_CAST (playbin), suburidecodebin);
+ group->pending = 1;
+ gst_element_set_state (suburidecodebin, GST_STATE_READY);
+ GST_SOURCE_GROUP_UNLOCK (group);
+ }
}
if (gst_element_set_state (uridecodebin, target) == GST_STATE_CHANGE_FAILURE)
goto uridecodebin_failure;
@@ -2731,11 +2744,6 @@ no_decodebin:
GST_SOURCE_GROUP_UNLOCK (group);
return FALSE;
}
-suburidecodebin_failure:
- {
- GST_DEBUG_OBJECT (playbin, "failed state change of subtitle uridecodebin");
- return FALSE;
- }
uridecodebin_failure:
{
GST_DEBUG_OBJECT (playbin, "failed state change of uridecodebin");