nlesource: Fail prepare() if no valid source pad is found

https://bugzilla.gnome.org/show_bug.cgi?id=771792
This commit is contained in:
Sebastian Dröge 2016-09-21 18:23:56 -04:00
parent 244266a94e
commit 5a0731a0a5

View 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);