gst-plugins-base: playbin2: Set sinks to READY before checking if it accept caps
Sebastian Dröge
slomo at kemper.freedesktop.org
Wed Mar 23 07:30:24 PDT 2011
Module: gst-plugins-base
Branch: master
Commit: b76efc7f5dcefb43b1ee737fdb5a4511826122c7
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=b76efc7f5dcefb43b1ee737fdb5a4511826122c7
Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date: Wed Mar 16 15:56:34 2011 +0100
playbin2: Set sinks to READY before checking if it accept caps
Fixes bug #642732.
---
gst/playback/gstplaybin2.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c
index 2bf07de..1cd9d5b 100644
--- a/gst/playback/gstplaybin2.c
+++ b/gst/playback/gstplaybin2.c
@@ -2967,6 +2967,12 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps,
if (sinkpad) {
GstCaps *sinkcaps;
+ /* Ignore errors here, if a custom sink fails to go
+ * to READY things are wrong and will error out later
+ */
+ if (GST_STATE (sink) < GST_STATE_READY)
+ gst_element_set_state (sink, GST_STATE_READY);
+
sinkcaps = gst_pad_get_caps_reffed (sinkpad);
if (!gst_caps_is_any (sinkcaps))
ret = !gst_pad_accept_caps (sinkpad, caps);
@@ -2993,6 +2999,12 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps,
if (sinkpad) {
GstCaps *sinkcaps;
+ /* Ignore errors here, if a custom sink fails to go
+ * to READY things are wrong and will error out later
+ */
+ if (GST_STATE (sink) < GST_STATE_READY)
+ gst_element_set_state (sink, GST_STATE_READY);
+
sinkcaps = gst_pad_get_caps_reffed (sinkpad);
if (!gst_caps_is_any (sinkcaps))
ret = !gst_pad_accept_caps (sinkpad, caps);
@@ -3008,6 +3020,12 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps,
if (sinkpad) {
GstCaps *sinkcaps;
+ /* Ignore errors here, if a custom sink fails to go
+ * to READY things are wrong and will error out later
+ */
+ if (GST_STATE (sink) < GST_STATE_READY)
+ gst_element_set_state (sink, GST_STATE_READY);
+
sinkcaps = gst_pad_get_caps_reffed (sinkpad);
if (!gst_caps_is_any (sinkcaps))
ret = !gst_pad_accept_caps (sinkpad, caps);
More information about the gstreamer-commits
mailing list