validate: scenario: fix caps leak

This commit is contained in:
Guillaume Desmottes 2015-03-30 16:47:28 +02:00 committed by Thibault Saunier
parent 37d0ea4335
commit 2f643bde2c

View file

@ -657,6 +657,7 @@ static int
find_input_selector (GValue * velement, const gchar * type)
{
GstElement *element = g_value_get_object (velement);
int result = !0;
if (G_OBJECT_TYPE (element) == g_type_from_name ("GstInputSelector")) {
GstPad *srcpad = gst_element_get_static_pad (element, "src");
@ -681,11 +682,13 @@ find_input_selector (GValue * velement, const gchar * type)
gst_object_unref (srcpad);
if (found)
return 0;
result = 0;
}
gst_caps_unref (caps);
}
}
return !0;
return result;
}
static GstElement *