glmemory: Provide correct size on upload
Provide the right size to GL when uploading. Using maxsize is wrong since we offset the data point with the memory offset and video alignement offset. https://bugzilla.gnome.org/show_bug.cgi?id=744246
This commit is contained in:
parent
3405eec996
commit
0cbe42af24
@ -655,9 +655,12 @@ _download_memory (GstGLContext * context, GstGLMemory * gl_mem)
|
||||
gl->GetTexImage (gl_mem->tex_target, 0, format, type, gl_mem->data);
|
||||
gl->BindTexture (gl_mem->tex_target, 0);
|
||||
} else if (gl_mem->transfer_pbo && CONTEXT_SUPPORTS_PBO_DOWNLOAD (context)) {
|
||||
gsize size = ((GstMemory *) gl_mem)->maxsize;
|
||||
gsize size;
|
||||
gpointer map_data = NULL;
|
||||
|
||||
size = gst_gl_get_plane_data_size (&gl_mem->info, &gl_mem->valign,
|
||||
gl_mem->plane);
|
||||
|
||||
gl->BindBuffer (GL_PIXEL_PACK_BUFFER, gl_mem->transfer_pbo);
|
||||
map_data =
|
||||
gl->MapBufferRange (GL_PIXEL_PACK_BUFFER, 0, size, GL_MAP_READ_BIT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user