videorate: Don't leak the pools

gst_query_set_nth_alloction_pool() is transfer none on the pool, so we must
unref the pool when done.
This commit is contained in:
Nicolas Dufresne 2015-03-24 15:18:36 -04:00
parent da52868f46
commit 9695222b0f

View file

@ -892,7 +892,7 @@ gst_video_rate_propose_allocation (GstBaseTransform * trans,
n_allocation = gst_query_get_n_allocation_pools (query); n_allocation = gst_query_get_n_allocation_pools (query);
while (i < n_allocation) { while (i < n_allocation) {
GstBufferPool *pool; GstBufferPool *pool = NULL;
guint size, min, max; guint size, min, max;
gst_query_parse_nth_allocation_pool (query, i, &pool, &size, &min, &max); gst_query_parse_nth_allocation_pool (query, i, &pool, &size, &min, &max);
@ -907,6 +907,8 @@ gst_video_rate_propose_allocation (GstBaseTransform * trans,
} }
gst_query_set_nth_allocation_pool (query, i, pool, size, min + 1, max); gst_query_set_nth_allocation_pool (query, i, pool, size, min + 1, max);
if (pool)
gst_object_unref (pool);
i++; i++;
} }