destroy EGLImage object after rendering 36/193836/3
authorSejun Park <sejun79.park@samsung.com>
Tue, 27 Nov 2018 02:36:41 +0000 (11:36 +0900)
committerSejun Park <sejun79.park@samsung.com>
Tue, 27 Nov 2018 06:33:22 +0000 (15:33 +0900)
- 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
video360/src/gstvideo360-formats.c
video360/src/gstvideo360.c

index 8349f9f..2badf4d 100644 (file)
@@ -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+
index f028ba1..9d5d0bc 100644 (file)
@@ -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
index dea5920..cb3e6fa 100644 (file)
@@ -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,