mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
glcolorconvert: error out if memory context is different than ours
This commit is contained in:
parent
2a4a3aa0d6
commit
a171eb80d6
1 changed files with 15 additions and 0 deletions
|
@ -2366,6 +2366,14 @@ _do_convert_one_view (GstGLContext * context, GstGLColorConvert * convert,
|
|||
res = FALSE;
|
||||
goto out;
|
||||
}
|
||||
if (convert->context != convert->priv->in_tex[i]->mem.context) {
|
||||
GST_ERROR_OBJECT (convert, "input memory OpenGL context is different. "
|
||||
"we have %" GST_PTR_FORMAT " memory has %" GST_PTR_FORMAT,
|
||||
convert->context, convert->priv->in_tex[i]->mem.context);
|
||||
res = FALSE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!gst_memory_map ((GstMemory *) convert->priv->in_tex[i], &in_info[i],
|
||||
GST_MAP_READ | GST_MAP_GL)) {
|
||||
GST_ERROR_OBJECT (convert, "failed to map input memory %p",
|
||||
|
@ -2386,6 +2394,13 @@ _do_convert_one_view (GstGLContext * context, GstGLColorConvert * convert,
|
|||
res = FALSE;
|
||||
goto out;
|
||||
}
|
||||
if (convert->context != out_tex->mem.context) {
|
||||
GST_ERROR_OBJECT (convert, "output memory OpenGL context is different. "
|
||||
"we have %" GST_PTR_FORMAT " memory has %" GST_PTR_FORMAT,
|
||||
convert->context, out_tex->mem.context);
|
||||
res = FALSE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
mem_width = gst_gl_memory_get_texture_width (out_tex);
|
||||
mem_height = gst_gl_memory_get_texture_height (out_tex);
|
||||
|
|
Loading…
Reference in a new issue