glbufferpool: Fix build error
authorVineeth TM <vineeth.tm@samsung.com>
Mon, 28 Dec 2015 00:04:12 +0000 (09:04 +0900)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:32:13 +0000 (19:32 +0000)
When GST_GL_HAVE_PLATFORM_EGL is not defined, then info variable
will not be used and this results in build error

https://bugzilla.gnome.org/show_bug.cgi?id=759913

gst-libs/gst/gl/gstglbufferpool.c

index 16b5c9e..c419ad5 100644 (file)
@@ -271,11 +271,8 @@ gst_gl_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
   GstGLMemoryAllocator *alloc;
   GstGLBufferPool *glpool = GST_GL_BUFFER_POOL_CAST (pool);
   GstGLBufferPoolPrivate *priv = glpool->priv;
-  GstVideoInfo *info;
   GstBuffer *buf;
 
-  info = priv->gl_params->v_info;
-
   if (!(buf = gst_buffer_new ())) {
     goto no_buffer;
   }
@@ -283,7 +280,8 @@ gst_gl_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
   if (priv->want_eglimage) {
     /* alloc and append memories, also add video_meta and
      * texture_upload_meta */
-    if (!gst_egl_image_memory_setup_buffer (glpool->context, info, buf))
+    if (!gst_egl_image_memory_setup_buffer (glpool->context,
+            priv->gl_params->v_info, buf))
       goto egl_image_mem_create_failed;
 
     *buffer = buf;