videoaggregator: fix caps leak when early returning

https://bugzilla.gnome.org/show_bug.cgi?id=747993

Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
This commit is contained in:
Guillaume Desmottes 2015-04-16 14:17:04 +02:00 committed by Vincent Penquerc'h
parent 516dc5e302
commit f5f632a503

View file

@ -734,10 +734,11 @@ gst_videoaggregator_update_src_caps (GstVideoAggregator * vagg)
gst_caps_unref (caps);
gst_caps_unref (peercaps);
caps = tmp;
caps = tmp; /* pass ownership */
if (gst_caps_is_empty (caps)) {
GST_DEBUG_OBJECT (vagg, "empty caps");
ret = FALSE;
gst_caps_unref (caps);
goto done;
}