[PATCH 1/2] icydemux: warning if setting srcpad caps fails

Anton Novikov random.plant at gmail.com
Tue May 22 04:10:50 PDT 2012


---
 gst/icydemux/gsticydemux.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gst/icydemux/gsticydemux.c b/gst/icydemux/gsticydemux.c
index 4970745..757d19d 100644
--- a/gst/icydemux/gsticydemux.c
+++ b/gst/icydemux/gsticydemux.c
@@ -232,8 +232,10 @@ gst_icydemux_add_srcpad (GstICYDemux * icydemux, GstCaps * new_caps)
 
     gst_pad_use_fixed_caps (icydemux->srcpad);
 
-    if (icydemux->src_caps)
-      gst_pad_set_caps (icydemux->srcpad, icydemux->src_caps);
+    if (icydemux->src_caps) {
+      if (!gst_pad_set_caps (icydemux->srcpad, icydemux->src_caps))
+        GST_WARNING_OBJECT (icydemux, "Failed to set caps on src pad");
+    }
 
     GST_DEBUG_OBJECT (icydemux, "Adding src pad with caps %" GST_PTR_FORMAT,
         icydemux->src_caps);
-- 
1.7.10.2



More information about the gstreamer-devel mailing list