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);
+ if (pool) {
+ gst_query_add_allocation_pool (query, pool, size, 2, 0);
+ gst_object_unref (pool);
+ }
/* we also support various metadata */
gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, 0);
- gst_object_unref (pool);
gl_apis =
gst_gl_api_to_string (gst_gl_context_get_gl_api (glimage_sink->context));
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);
GstBufferPool *pool;
GstStructure *config;
GstCaps *caps;
- guint size;
+ guint size = 0;
gboolean need_pool;
GError *error = NULL;
GstStructure *gl_context;
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);
guint out_tex;
guint array_index = 0;
guint i;
- gboolean res;
+ gboolean res = TRUE;
GST_TRACE ("Processing buffers");