mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
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
e9bec9ec0e
commit
8c0fcef818
1 changed files with 4 additions and 1 deletions
|
@ -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…
Reference in a new issue