mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 23:18:52 +00:00
gl/color: explicitly map the buffers we are copying into
Otherwise it may not be downloaded at all.
This commit is contained in:
parent
0cf6b2be3e
commit
7a424780ce
1 changed files with 7 additions and 0 deletions
|
@ -1224,10 +1224,17 @@ _do_convert (GstGLContext * context, GstGLColorConvert * convert)
|
||||||
|| out_width != convert->out_tex[i]->width
|
|| out_width != convert->out_tex[i]->width
|
||||||
|| out_height != convert->out_tex[i]->height) {
|
|| out_height != convert->out_tex[i]->height) {
|
||||||
GstGLMemory *gl_mem = convert->out_tex[i];
|
GstGLMemory *gl_mem = convert->out_tex[i];
|
||||||
|
GstMapInfo from_info, to_info;
|
||||||
|
|
||||||
|
gst_memory_map ((GstMemory *) convert->priv->out_temp[i], &from_info,
|
||||||
|
GST_MAP_READ | GST_MAP_GL);
|
||||||
|
gst_memory_map ((GstMemory *) gl_mem, &to_info,
|
||||||
|
GST_MAP_WRITE | GST_MAP_GL);
|
||||||
gst_gl_memory_copy_into_texture (convert->priv->out_temp[i],
|
gst_gl_memory_copy_into_texture (convert->priv->out_temp[i],
|
||||||
gl_mem->tex_id, gl_mem->tex_type, gl_mem->width, gl_mem->height,
|
gl_mem->tex_id, gl_mem->tex_type, gl_mem->width, gl_mem->height,
|
||||||
FALSE);
|
FALSE);
|
||||||
|
gst_memory_unmap ((GstMemory *) gl_mem, &to_info);
|
||||||
|
gst_memory_unmap ((GstMemory *) convert->priv->out_temp[i], &from_info);
|
||||||
} else {
|
} else {
|
||||||
convert->priv->out_temp[i] = NULL;
|
convert->priv->out_temp[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue