videoaggregator: plug caps leak

It was losing ref of the original 'ret' caps that would be returned
or returning it with 2 references to it.
This commit is contained in:
Thiago Santos 2016-04-18 13:46:55 -03:00
parent 641bb44226
commit 5fc6284cdc

View file

@ -680,9 +680,10 @@ gst_videoaggregator_default_update_caps (GstVideoAggregator * vagg,
ret = gst_caps_merge (best_format_caps, gst_caps_ref (caps));
if (filter) {
ret = gst_caps_intersect (ret, filter);
} else {
gst_caps_ref (ret);
GstCaps *tmp;
tmp = gst_caps_intersect (ret, filter);
gst_caps_unref (ret);
ret = tmp;
}
return ret;