[gst-cvs] gst-plugins-base: playbin: The internally linked pad of the selector might be NULL in some cases

Sebastian Dröge slomo at kemper.freedesktop.org
Wed Aug 26 07:56:44 PDT 2009


Module: gst-plugins-base
Branch: master
Commit: 460dc94d2338aba5c91930d903411a03ccaabc9a
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=460dc94d2338aba5c91930d903411a03ccaabc9a

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Wed Aug 26 16:56:19 2009 +0200

playbin: The internally linked pad of the selector might be NULL in some cases

---

 gst/playback/gstinputselector.c  |    3 ++-
 gst/playback/gststreamselector.c |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gst/playback/gstinputselector.c b/gst/playback/gstinputselector.c
index 1d1f9f1..579932f 100644
--- a/gst/playback/gstinputselector.c
+++ b/gst/playback/gstinputselector.c
@@ -330,7 +330,8 @@ gst_selector_pad_iterate_linked_pads (GstPad * pad)
   it = gst_iterator_new_single (GST_TYPE_PAD, otherpad,
       (GstCopyFunction) gst_object_ref, (GFreeFunc) gst_object_unref);
 
-  gst_object_unref (otherpad);
+  if (otherpad)
+    gst_object_unref (otherpad);
   gst_object_unref (sel);
 
   return it;
diff --git a/gst/playback/gststreamselector.c b/gst/playback/gststreamselector.c
index bfc6020..0fb4f4c 100644
--- a/gst/playback/gststreamselector.c
+++ b/gst/playback/gststreamselector.c
@@ -691,7 +691,8 @@ gst_stream_selector_pad_iterate_linked_pads (GstPad * pad)
       gst_iterator_new_single (GST_TYPE_PAD, otherpad,
       (GstCopyFunction) gst_object_ref, (GFreeFunc) gst_object_unref);
 
-  gst_object_unref (otherpad);
+  if (otherpad)
+    gst_object_unref (otherpad);
   gst_object_unref (sel);
 
   return ret;





More information about the Gstreamer-commits mailing list