1 From daa3278503beb6b8ba74b4362622c5e65110708a Mon Sep 17 00:00:00 2001
2 From: Carlos Rafael Giani <dv@pseudoterminal.org>
3 Date: Wed, 7 Jun 2017 18:00:08 +0200
4 Subject: [PATCH 1/2] gstgl: Fix sanity check in gst_gl_memory_setup_buffer()
7 gst-libs/gst/gl/gstglmemory.c | 4 +++-
8 1 file changed, 3 insertions(+), 1 deletion(-)
10 diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c
11 index 76d703418..24c2350b8 100644
12 --- a/gst-libs/gst/gl/gstglmemory.c
13 +++ b/gst-libs/gst/gl/gstglmemory.c
14 @@ -1456,8 +1456,10 @@ gst_gl_memory_setup_buffer (GstGLMemoryAllocator * allocator,
18 + /* Sanity check for the code below; either, there are no wrapped pointers,
19 + * or there are at least as many pointers as there are memory blocks */
20 g_return_val_if_fail (!wrapped_data
21 - || views * n_mem != n_wrapped_pointers, FALSE);
22 + || n_mem >= n_wrapped_pointers, FALSE);
24 for (v = 0; v < views; v++) {
25 for (i = 0; i < n_mem; i++) {