[vlc-commits] x11: remove redundant variable

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


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 16 23:25:39 2018 +0300| [744a88579b07107b20d8e91b012ab9522d1944f7] | committer: Rémi Denis-Courmont

x11: remove redundant variable

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

 modules/video_output/xcb/x11.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index 7567b3b891..2541cc4dff 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -64,7 +64,6 @@ vlc_module_end ()
 struct vout_display_sys_t
 {
     xcb_connection_t *conn;
-    vout_window_t *embed; /* VLC window */
 
     xcb_window_t window; /* drawable X window */
     xcb_gcontext_t gc; /* context to put images */
@@ -113,8 +112,7 @@ static int Open (vlc_object_t *obj)
     /* Get window, connect to X server */
     xcb_connection_t *conn;
     const xcb_screen_t *scr;
-    sys->embed = vlc_xcb_parent_Create(vd, &conn, &scr);
-    if (sys->embed == NULL)
+    if (vlc_xcb_parent_Create(vd, &conn, &scr) == NULL)
     {
         free (sys);
         return VLC_EGENERIC;
@@ -271,7 +269,7 @@ found_format:;
 
         xcb_create_pixmap (conn, sys->depth, pixmap, scr->root, 1, 1);
         c = xcb_create_window_checked (conn, sys->depth, sys->window,
-                                       sys->embed->handle.xid, 0, 0,
+                                       vd->cfg->window->handle.xid, 0, 0,
                                        vd->cfg->display.width,
                                        vd->cfg->display.height, 0,
                                        XCB_WINDOW_CLASS_INPUT_OUTPUT,



More information about the vlc-commits mailing list