projects
/
platform
/
upstream
/
gst-plugins-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5df0fbf
)
glimagesink: Don't leak pool
author
Nicolas Dufresne
<nicolas.dufresne@collabora.com>
Fri, 26 Jun 2015 18:12:22 +0000
(14:12 -0400)
committer
Tim-Philipp Müller
<tim@centricular.com>
Sat, 9 Dec 2017 19:32:05 +0000
(19:32 +0000)
gst_query_add_allocation_pool is transfer none. Also unref
if there was a configuration error.
ext/gl/gstglimagesink.c
patch
|
blob
|
history
diff --git
a/ext/gl/gstglimagesink.c
b/ext/gl/gstglimagesink.c
index b8fd96c4e102afb8e68df6aa2f2329e89a01e268..41e173f66fbbbf25aae36cf35f9f370b5115efa9 100644
(file)
--- a/
ext/gl/gstglimagesink.c
+++ b/
ext/gl/gstglimagesink.c
@@
-1530,11
+1530,14
@@
gst_glimage_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
config = gst_buffer_pool_get_config (pool);
gst_buffer_pool_config_set_params (config, caps, size, 0, 0);
- if (!gst_buffer_pool_set_config (pool, config))
+ if (!gst_buffer_pool_set_config (pool, config)) {
+ g_object_unref (pool);
goto config_failed;
+ }
/* we need at least 2 buffer because we hold on to the last one */
gst_query_add_allocation_pool (query, pool, size, 2, 0);
+ g_object_unref (pool);
}
if (glimage_sink->context->gl_vtable->FenceSync)