fix up! base:tizenmemory: Add new function to create GstTizenMemory with tbm bo 15/274215/1 accepted/tizen/unified/20220426.021349 submit/tizen/20220422.064402
authorJeongmo Yang <jm80.yang@samsung.com>
Mon, 25 Apr 2022 02:43:21 +0000 (11:43 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Mon, 25 Apr 2022 02:43:21 +0000 (11:43 +0900)
[Version] 1.20.0-20
[Issue Type] Bug fix

Change-Id: I89526c7782fd2dde82bb18a3d30101926f811866
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/gstreamer.spec
subprojects/gst-plugins-base/gst-libs/gst/allocators/gsttizenmemory.c

index 5f5e7814e69513d015498a3e2624e0a90dcacec2..5f135a2fa4e62a26840cc9d1106bfd888647b37c 100644 (file)
@@ -60,7 +60,7 @@
 
 Name:           %{_name}
 Version:        1.20.0
-Release:        19
+Release:        20
 Summary:        Streaming-Media Framework Runtime
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
index 7efc8da7945af749c3f1a02b27a10ed64478116f..222f8ec023eca5412daf9dd0e8d81d01c0aad042 100644 (file)
@@ -87,11 +87,6 @@ _tizen_video_mem_new (GstAllocator * allocator, GstMemory * parent, GstVideoInfo
     return NULL;
   }
 
-  if (!tbm_surface_internal_is_valid (surface)) {
-    GST_ERROR ("Invalid tbm surface");
-    return NULL;
-  }
-
   tmem = g_slice_new0 (GstTizenMemory);
 
   /* Creates the tbm_surface with buffer objects. */
@@ -105,6 +100,12 @@ _tizen_video_mem_new (GstAllocator * allocator, GstMemory * parent, GstVideoInfo
     tmem->surface = tbm_surface_internal_create_with_flags (width, height, format, TBM_BO_NONCACHABLE);
   }
 
+  if (!tbm_surface_internal_is_valid (tmem->surface)) {
+    GST_ERROR ("Invalid tbm surface");
+    g_slice_free (GstTizenMemory, tmem);
+    return NULL;
+  }
+
   tbm_surface_get_info (tmem->surface, &sinfo);
 
   for (i = 0; i < sinfo.num_planes; i++) {