mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
glupload: keep the parent buffer around when converting EGLImage to 2D textures
e.g. receiving and releasing a buffer from OMX too early will potentially cause textures to be overwritten while/before they are displayed.
This commit is contained in:
parent
417bae7f23
commit
5115eadc46
1 changed files with 2 additions and 4 deletions
|
@ -583,6 +583,8 @@ _egl_image_upload_perform_gl_thread (GstGLContext * context,
|
||||||
|
|
||||||
/* FIXME: buffer pool */
|
/* FIXME: buffer pool */
|
||||||
*image->outbuf = gst_buffer_new ();
|
*image->outbuf = gst_buffer_new ();
|
||||||
|
gst_buffer_add_parent_buffer_meta (*image->outbuf, image->buffer);
|
||||||
|
|
||||||
gst_gl_memory_setup_buffer (allocator, *image->outbuf, image->params);
|
gst_gl_memory_setup_buffer (allocator, *image->outbuf, image->params);
|
||||||
gst_object_unref (allocator);
|
gst_object_unref (allocator);
|
||||||
|
|
||||||
|
@ -600,10 +602,6 @@ _egl_image_upload_perform_gl_thread (GstGLContext * context,
|
||||||
gl->EGLImageTargetTexture2D (GL_TEXTURE_2D,
|
gl->EGLImageTargetTexture2D (GL_TEXTURE_2D,
|
||||||
gst_egl_image_memory_get_image (mem));
|
gst_egl_image_memory_get_image (mem));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GST_IS_GL_BUFFER_POOL (image->buffer->pool))
|
|
||||||
gst_gl_buffer_pool_replace_last_buffer (GST_GL_BUFFER_POOL (image->
|
|
||||||
buffer->pool), image->buffer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstGLUploadReturn
|
static GstGLUploadReturn
|
||||||
|
|
Loading…
Reference in a new issue