nlesource: Fail prepare() if no valid source pad is found
authorSebastian Dröge <sebastian@centricular.com>
Wed, 21 Sep 2016 22:23:56 +0000 (18:23 -0400)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 21 Sep 2016 22:24:34 +0000 (18:24 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=771792

plugins/nle/nlesource.c

index 3217e0b..0fa35c8 100644 (file)
@@ -488,6 +488,8 @@ nle_source_prepare (NleObject * object)
 
   if (!priv->staticpad && !(get_valid_src_pad (source, source->element, &pad))) {
     GST_DEBUG_OBJECT (source, "Couldn't find a valid source pad");
+    gst_object_unref (parent);
+    return FALSE;
   } else {
     if (priv->staticpad)
       pad = gst_object_ref (priv->staticpad);