tizenwlsink : Check non top-level window created by App for tbm memory allocation 04/168204/1
authorHyunil <hyunil46.park@samsung.com>
Thu, 25 Jan 2018 04:13:22 +0000 (13:13 +0900)
committerHyunil <hyunil46.park@samsung.com>
Thu, 25 Jan 2018 04:13:22 +0000 (13:13 +0900)
Change-Id: I8375dfb37774782e9cc9ebfcbfdc9c242c0dd2c2
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
tizenwlsink/src/gsttizenwlsink.c

index 594d63a..3ac5f31 100644 (file)
@@ -1915,7 +1915,9 @@ gst_tizen_wl_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
     if (sink->display->is_native_format == TRUE)
       return FALSE;
 
-    if (!gst_wl_window_is_toplevel (sink->window))
+    /* in case of using gst-launch, top level window is maded after propose allocation,
+     * so we can avoid allocating tbm memory of wayland when use app's window with normal video format */
+    if (G_UNLIKELY (sink->window))
       return FALSE;
 
     gst_query_parse_allocation (query, &caps, &need_pool);