glbasememory: fix copying GstGLAllocationParams
authorMatthew Waters <matthew@centricular.com>
Wed, 6 Jan 2016 04:50:07 +0000 (15:50 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:32:14 +0000 (19:32 +0000)
Fixes a GST_IS_GL_CONTEXT critical

gst-libs/gst/gl/gstglbasememory.c

index 1988b327af2c0241b4cb87181b650f94377f3eba..dbc756ebc7204642fd758efd9ab7a918914ebb5b 100644 (file)
@@ -654,11 +654,9 @@ gst_gl_allocation_params_copy_data (GstGLAllocationParams * src,
     GstGLAllocationParams * dest)
 {
   gst_gl_allocation_params_init (dest, src->struct_size, src->alloc_flags,
-      src->copy, src->free, NULL, src->alloc_size, NULL, src->wrapped_data,
-      src->gl_handle, src->user_data, src->notify);
+      src->copy, src->free, src->context, src->alloc_size, NULL,
+      src->wrapped_data, src->gl_handle, src->user_data, src->notify);
 
-  if (src->context)
-    dest->context = gst_object_ref (src->context);
   if (src->alloc_params)
     dest->alloc_params = gst_allocation_params_copy (src->alloc_params);
 }