[gst-cvs] gst-plugins-base: playbin2: If setting the state of the suburidecodebin fails just warn, don' t error out
Sebastian Dröge
slomo at kemper.freedesktop.org
Sat Oct 24 04:08:42 PDT 2009
Module: gst-plugins-base
Branch: master
Commit: 497d0a479363191fb6b455c96687fb02120657b1
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=497d0a479363191fb6b455c96687fb02120657b1
Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date: Sat Oct 24 13:07:45 2009 +0200
playbin2: If setting the state of the suburidecodebin fails just warn, don't error out
---
gst/playback/gstplaybin2.c | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c
index 50ca979..dc32484 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");
More information about the Gstreamer-commits
mailing list