From eabd53e146501b4572db28984d9572bb0e7a071c Mon Sep 17 00:00:00 2001 From: Sejun Park Date: Tue, 27 Nov 2018 11:36:41 +0900 Subject: [PATCH] destroy EGLImage object after rendering - The egl image must be destroyed after rendering, but eglDestroyImage() calling is missed in standard format rendering. Change-Id: I2ee08f87564b8c0c2fe035b35953435ee72f4c8d --- packaging/gst-plugins-tizen.spec | 2 +- video360/src/gstvideo360-formats.c | 4 +++- video360/src/gstvideo360.c | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packaging/gst-plugins-tizen.spec b/packaging/gst-plugins-tizen.spec index 8349f9f..2badf4d 100644 --- a/packaging/gst-plugins-tizen.spec +++ b/packaging/gst-plugins-tizen.spec @@ -9,7 +9,7 @@ Name: gst-plugins-tizen Version: 1.0.0 Summary: GStreamer tizen plugins (common) -Release: 60 +Release: 61 Group: Multimedia/Framework Url: http://gstreamer.freedesktop.org/ License: LGPL-2.1+ diff --git a/video360/src/gstvideo360-formats.c b/video360/src/gstvideo360-formats.c index f028ba1..9d5d0bc 100644 --- a/video360/src/gstvideo360-formats.c +++ b/video360/src/gstvideo360-formats.c @@ -130,7 +130,9 @@ gst_video360_standard_formats_renderer (GstVideo360 * this, void *in_data, #ifdef GST_TIZEN_GL_PLATFORM_EGL #ifdef GST_TIZEN_USE_EGLIMAGE -#ifndef GST_TIZEN_USE_NATIVE_FORMATS +#ifdef GST_TIZEN_USE_NATIVE_FORMATS + this->eglDestroyImage (this->egl_display, out_egl_image); +#else memcpy (out_data, this->output_image_ptr, this->output_frame_buffer_size); #endif #else diff --git a/video360/src/gstvideo360.c b/video360/src/gstvideo360.c index dea5920..cb3e6fa 100644 --- a/video360/src/gstvideo360.c +++ b/video360/src/gstvideo360.c @@ -851,8 +851,10 @@ gst_video360_chain (GstPad * pad, GstObject * parent, GstBuffer * in_buf) #ifdef GST_TIZEN_USE_NATIVE_FORMATS if ((out_buf = gst_buffer_new ())) { - surface = tbm_surface_internal_create_with_flags (GST_VIDEO_INFO_WIDTH(&info), GST_VIDEO_INFO_HEIGHT(&info), TBM_FORMAT_ARGB8888, TBM_BO_WC); - out_mem = gst_tizen_allocator_alloc_surface (this->allocator, &info, surface, surface, _buffer_finalize); + surface = tbm_surface_internal_create_with_flags (GST_VIDEO_INFO_WIDTH(&info), + GST_VIDEO_INFO_HEIGHT(&info), TBM_FORMAT_ARGB8888, TBM_BO_WC); + out_mem = gst_tizen_allocator_alloc_surface (this->allocator, + &info, surface, surface, _buffer_finalize); gst_buffer_append_memory (out_buf, out_mem); #else if ((out_buf = gst_buffer_new_allocate (NULL, -- 2.7.4