glmemory: Handle failure of memory allocation gracefully

This commit is contained in:
Sebastian Dröge 2014-11-27 18:09:14 +01:00
parent f2dc9b2b8f
commit b6ba579fa0

View file

@ -1172,6 +1172,8 @@ gst_gl_memory_setup_buffer (GstGLContext * context, GstVideoInfo * info,
for (i = 0; i < n_mem; i++) {
gl_mem[i] = (GstGLMemory *) gst_gl_memory_alloc (context, info, i);
if (gl_mem[i] == NULL)
return FALSE;
gst_buffer_append_memory (buffer, (GstMemory *) gl_mem[i]);
}