summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorMatthew Waters <ystreet00@gmail.com>2014-04-02 22:42:50 +1100
committerMatthew Waters <ystreet00@gmail.com>2014-04-02 22:42:50 +1100
commite58cd96b96df15574004716647fb72dc06a89b01 (patch)
tree1ec1f878d9f4b7fa93ab97e34c23d9d9f22c1a81 /gst-libs
parent5eb5e67f539ed965790b0243e2a8284ea6f3412d (diff)
gl: avoid adding a NULL pool to propose allocation
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/gl/gstglfilter.c6
-rw-r--r--gst-libs/gst/gl/gstglmixer.c11
2 files changed, 11 insertions, 6 deletions
diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c
index 1358e006a..41339f17f 100644
--- a/gst-libs/gst/gl/gstglfilter.c
+++ b/gst-libs/gst/gl/gstglfilter.c
@@ -806,8 +806,10 @@ gst_gl_filter_propose_allocation (GstBaseTransform * trans,
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, 1, 0);
- gst_object_unref (pool);
+ if (pool) {
+ gst_query_add_allocation_pool (query, pool, size, 1, 0);
+ gst_object_unref (pool);
+ }
/* we also support various metadata */
gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, 0);
diff --git a/gst-libs/gst/gl/gstglmixer.c b/gst-libs/gst/gl/gstglmixer.c
index e4714b7ab..41db06732 100644
--- a/gst-libs/gst/gl/gstglmixer.c
+++ b/gst-libs/gst/gl/gstglmixer.c
@@ -321,7 +321,7 @@ gst_gl_mixer_propose_allocation (GstGLMixer * mix,
GstBufferPool *pool;
GstStructure *config;
GstCaps *caps;
- guint size;
+ guint size = 0;
gboolean need_pool;
GError *error = NULL;
GstStructure *gl_context;
@@ -381,8 +381,11 @@ gst_gl_mixer_propose_allocation (GstGLMixer * mix,
if (!gst_buffer_pool_set_config (pool, config))
goto config_failed;
}
- gst_query_add_allocation_pool (query, pool, size, 1, 0);
- gst_object_unref (pool);
+
+ if (pool) {
+ gst_query_add_allocation_pool (query, pool, size, 1, 0);
+ gst_object_unref (pool);
+ }
/* we also support various metadata */
gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, 0);
@@ -1614,7 +1617,7 @@ gst_gl_mixer_process_textures (GstGLMixer * mix, GstBuffer * outbuf)
guint out_tex;
guint array_index = 0;
guint i;
- gboolean res;
+ gboolean res = TRUE;
GST_TRACE ("Processing buffers");