From 9695222b0ff94b1d2f17511280061ec1cee509a0 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Tue, 24 Mar 2015 15:18:36 -0400 Subject: [PATCH] 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. --- gst/videorate/gstvideorate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/videorate/gstvideorate.c b/gst/videorate/gstvideorate.c index 1aaf021..401f09e 100644 --- a/gst/videorate/gstvideorate.c +++ b/gst/videorate/gstvideorate.c @@ -892,7 +892,7 @@ gst_video_rate_propose_allocation (GstBaseTransform * trans, n_allocation = gst_query_get_n_allocation_pools (query); while (i < n_allocation) { - GstBufferPool *pool; + GstBufferPool *pool = NULL; guint 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); + if (pool) + gst_object_unref (pool); i++; } -- 2.7.4