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. */
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++) {