mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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:
parent
da52868f46
commit
9695222b0f
1 changed files with 3 additions and 1 deletions
|
@ -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++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue