[vlc-commits] display: clean vout_display_IsWindowed() up

Rémi Denis-Courmont git at videolan.org
Sun May 20 19:51:40 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 16 22:34:15 2018 +0300| [4f5c052c32f4de4f409caa73131897d54a632039] | committer: Rémi Denis-Courmont

display: clean vout_display_IsWindowed() up

Do not attach and detach the window. Just check if it is there.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4f5c052c32f4de4f409caa73131897d54a632039
---

 include/vlc_vout_display.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 9859d7ef7d..a9ee54690b 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -392,10 +392,7 @@ static inline void vout_display_DeleteWindow(vout_display_t *vd,
 
 static inline bool vout_display_IsWindowed(vout_display_t *vd)
 {
-    vout_window_t *window = vout_display_NewWindow(vd, VOUT_WINDOW_TYPE_INVALID);
-    if (window != NULL)
-        vout_display_DeleteWindow(vd, window);
-    return window != NULL;
+    return vd->cfg->window != NULL;
 }
 
 /**



More information about the vlc-commits mailing list