summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-08-26 16:56:19 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-08-26 16:56:19 +0200
commit460dc94d2338aba5c91930d903411a03ccaabc9a (patch)
tree306ed61ca401a8391297e106ca064588a0268c1b
parent67a0ef9b3a6cbb788a5504f81db2a760d18ee83d (diff)
playbin: The internally linked pad of the selector might be NULL in some cases
-rw-r--r--gst/playback/gstinputselector.c3
-rw-r--r--gst/playback/gststreamselector.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/gst/playback/gstinputselector.c b/gst/playback/gstinputselector.c
index 1d1f9f1a1..579932f19 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 bfc6020c9..0fb4f4c82 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;