summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <ystreet00@gmail.com>2014-04-11 17:23:32 +1000
committerMatthew Waters <ystreet00@gmail.com>2014-04-11 17:26:09 +1000
commit7a424780ce0fff6b8df9a8d8cb9c768a2dffc433 (patch)
tree07acf9f2baaa9dded6cd1fec3562648c34bda21e
parent0cf6b2be3ed0aec022118893bf0a496d6098f5e3 (diff)
gl/color: explicitly map the buffers we are copying into
Otherwise it may not be downloaded at all.
-rw-r--r--gst-libs/gst/gl/gstglcolorconvert.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
index 3287bcb02..fff17442d 100644
--- a/gst-libs/gst/gl/gstglcolorconvert.c
+++ b/gst-libs/gst/gl/gstglcolorconvert.c
@@ -1224,10 +1224,17 @@ _do_convert (GstGLContext * context, GstGLColorConvert * convert)
|| out_width != convert->out_tex[i]->width
|| out_height != convert->out_tex[i]->height) {
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],
gl_mem->tex_id, gl_mem->tex_type, gl_mem->width, gl_mem->height,
FALSE);
+ gst_memory_unmap ((GstMemory *) gl_mem, &to_info);
+ gst_memory_unmap ((GstMemory *) convert->priv->out_temp[i], &from_info);
} else {
convert->priv->out_temp[i] = NULL;
}