mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
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
This commit is contained in:
parent
db07f4507d
commit
b89c94b37e
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue