waylandsink : remove memory leak 44/77144/2 accepted/tizen/common/20160703.130534 accepted/tizen/ivi/20160701.033253 accepted/tizen/mobile/20160701.033426 accepted/tizen/tv/20160701.033050 accepted/tizen/wearable/20160701.033140 submit/tizen/20160630.084032 submit/tizen_common/20160701.180000
authorHyunil <hyunil46.park@samsung.com>
Wed, 29 Jun 2016 00:31:51 +0000 (09:31 +0900)
committerHyunil <hyunil46.park@samsung.com>
Wed, 29 Jun 2016 06:26:28 +0000 (15:26 +0900)
Change-Id: I5b84cc85dad90314b2120874ceed6e4533d90a17
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
ext/wayland/gstwaylandsink.c
ext/wayland/gstwaylandsink.h
ext/wayland/wldisplay.c

index 66edd6a..451dbf6 100755 (executable)
@@ -1054,6 +1054,9 @@ gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter)
     gst_structure_set_value (gst_caps_get_structure (caps, 0), "format", &list);
 
     GST_DEBUG_OBJECT (sink, "display caps: %" GST_PTR_FORMAT, caps);
+    g_value_unset (&value);
+    g_value_unset (&list);
+
   }
 
   g_mutex_unlock (&sink->display_lock);
@@ -1096,7 +1099,6 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
   if (!gst_video_info_from_caps (&info, caps))
     goto invalid_format;
 #ifdef GST_WLSINK_ENHANCEMENT
-  sink->caps = gst_caps_copy (caps);
   if (sink->USE_TBM) {
     tbm_format =
         gst_video_format_to_wl_tbm_format (GST_VIDEO_INFO_FORMAT (&info));
index a8249b8..afc73d6 100644 (file)
@@ -101,7 +101,6 @@ struct _GstWaylandSink
   gboolean keep_camera_preview;
   gboolean got_eos_event;
   gboolean USE_TBM;
-  GstCaps *caps;
   guint rotate_angle;
   guint display_geometry_method;
   guint orientation;
index 54dd85f..98686ac 100644 (file)
@@ -152,6 +152,8 @@ gst_wl_display_finalize (GObject * gobject)
     wl_display_disconnect (self->display);
   }
 #ifdef GST_WLSINK_ENHANCEMENT
+  if (self->scaler)
+    wl_scaler_destroy (self->scaler);
   if (self->tizen_policy)
     tizen_policy_destroy (self->tizen_policy);
   if (self->tizen_video)