diff options
author | Matthew Waters <matthew@centricular.com> | 2016-04-06 04:15:40 +0000 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2016-04-12 09:41:23 +1000 |
commit | 5115eadc467fa717a713efcd1bb678218ff88bb6 (patch) | |
tree | 2a7a98a49a91dee5e34c881359770b6c86d6600c /gst-libs/gst | |
parent | 417bae7f23c04f0afb3b7ef14a54c03ee71ab701 (diff) | |
download | gstreamer-plugins-bad-5115eadc467fa717a713efcd1bb678218ff88bb6.tar.gz |
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.
Diffstat (limited to 'gst-libs/gst')
-rw-r--r-- | gst-libs/gst/gl/gstglupload.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index 32e6150fa..0f11e0415 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -583,6 +583,8 @@ _egl_image_upload_perform_gl_thread (GstGLContext * context, /* FIXME: buffer pool */ *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_object_unref (allocator); @@ -600,10 +602,6 @@ _egl_image_upload_perform_gl_thread (GstGLContext * context, gl->EGLImageTargetTexture2D (GL_TEXTURE_2D, 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 |