waylandsink : add checking null point of flush_buffer 43/98743/1 accepted/tizen/common/20161122.192812 accepted/tizen/ivi/20161122.235917 accepted/tizen/mobile/20161122.235711 accepted/tizen/tv/20161122.235753 accepted/tizen/wearable/20161122.235834 submit/tizen/20161122.044017
authorHyunil <hyunil46.park@samsung.com>
Fri, 18 Nov 2016 11:50:39 +0000 (20:50 +0900)
committerHyunil <hyunil46.park@samsung.com>
Fri, 18 Nov 2016 11:50:39 +0000 (20:50 +0900)
Change-Id: I1d4f7d966db16e277392fdfe90e046138c6df0d3
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
ext/wayland/wlbuffer.c
ext/wayland/wlwindow.c

index e49d98d..11e0e53 100644 (file)
@@ -126,17 +126,19 @@ gst_wl_buffer_finalize (GObject * gobject)
 #ifdef USE_WL_FLUSH_BUFFER
   if (self->display) {
     if (self->is_flush_request) {
-      if (self->display->flush_tbm_bufmgr)
-        self->display->flush_tbm_bufmgr = NULL;
-      for (i = 0; i < NV_BUF_PLANE_NUM; i++) {
-        if (self->display->flush_buffer->bo[i]) {
-          GST_LOG ("tbm_bo_unref (bo@%p)", self->display->flush_buffer->bo[i]);
-          tbm_bo_unref (self->display->flush_buffer->bo[i]);
-          self->display->flush_buffer->bo[i] = NULL;
+      self->display->flush_tbm_bufmgr = NULL;
+      if (self->display->flush_buffer) {
+        for (i = 0; i < NV_BUF_PLANE_NUM; i++) {
+          if (self->display->flush_buffer->bo[i]) {
+            GST_LOG ("tbm_bo_unref (bo@%p)",
+                self->display->flush_buffer->bo[i]);
+            tbm_bo_unref (self->display->flush_buffer->bo[i]);
+            self->display->flush_buffer->bo[i] = NULL;
+          }
         }
+        g_free (self->display->flush_buffer);
+        self->display->flush_buffer = NULL;
       }
-      g_free (self->display->flush_buffer);
-      self->display->flush_buffer = NULL;
     }
   }
 #endif
index 4ef7375..c02c796 100644 (file)
@@ -943,29 +943,7 @@ gst_wl_window_set_render_rectangle (GstWlWindow * window, gint x, gint y,
   GST_LOG ("set roi x(%d), y(%d), w(%d), h(%d)", x, y, w, h);
 
   return;
-#if 0
-  /* position the area inside the parent - needs a parent commit to apply */
-  /* use tizen view port */
-  if (window->tizen_area_viewport) {
-    GST_INFO
-        ("tizen_viewport_set_destination (tizen_area_viewport(tizen_viewport)@%p, x@%d, y@%d, w@%d, h@%d)",
-        window->tizen_area_viewport, x, y, w, h);
-    tizen_viewport_set_destination (window->tizen_area_viewport, x, y, w, h);
-  }
 
-  if (window->video_width != 0) {
-    GST_INFO ("wl_subsurface_set_sync (video_subsurface@%p)",
-        window->video_subsurface);
-    wl_subsurface_set_sync (window->video_subsurface);
-    /* use tizen view port */
-    gst_wl_window_resize_tizen_video_viewport (window, TRUE);
-    GST_INFO ("wl_subsurface_set_desync (video_subsurface@%p)",
-        window->video_subsurface);
-    wl_subsurface_set_desync (window->video_subsurface);
-  }
-  GST_INFO ("wl_surface_commit (area_surface@%p)", window->area_surface);
-  wl_surface_commit (window->area_surface);
-#endif
 #else /* open source */
 
   g_return_if_fail (window != NULL);