diff options
author | Julien Isorce <jisorce@oblong.com> | 2017-08-01 10:21:51 +0100 |
---|---|---|
committer | Julien Isorce <jisorce@oblong.com> | 2017-08-01 10:32:36 +0100 |
commit | b89c94b37eda4e9c093b159d6536bbef2ef30e27 (patch) | |
tree | 5b9fd934ce66bdc8e7e191bfaa0ae59c8bd614df /gst-libs/gst/gl | |
parent | db07f4507dad6561fc7e9320624aa7f0f0e10b36 (diff) |
gl: return NULL mem if eglCreateImage failed
Found on rpi when gpu_mem is too low so there is not enough memory to
create the eglimage. But still gst_buffer_pool_acquire_buffer succeeded.
And it leads to a CRITICAL assert:
gst_egl_image_get_image: assertion 'GST_IS_EGL_IMAGE (image)' failed
https://bugzilla.gnome.org/show_bug.cgi?id=785518
Diffstat (limited to 'gst-libs/gst/gl')
-rw-r--r-- | gst-libs/gst/gl/egl/gstglmemoryegl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.c b/gst-libs/gst/gl/egl/gstglmemoryegl.c index 378925f0c..32c4223c2 100644 --- a/gst-libs/gst/gl/egl/gstglmemoryegl.c +++ b/gst-libs/gst/gl/egl/gstglmemoryegl.c @@ -155,6 +155,11 @@ _gl_mem_egl_alloc (GstGLBaseMemoryAllocator * allocator, params->parent.alloc_params, params->v_info, params->plane, params->valign, params->parent.user_data, params->parent.notify); + if (!mem->image) { + gst_allocator_free (GST_ALLOCATOR_CAST (allocator), GST_MEMORY_CAST (mem)); + return NULL; + } + return mem; } |