]> git.sesse.net Git - vlc/blobdiff - modules/video_output/x11/glx.c
* picture.c : slightly cleaner picture_t freeing
[vlc] / modules / video_output / x11 / glx.c
index c0380b02f6a974f8e605c3d372fae5a43f6cfb9e..f4a84cec881afeabe2591e99dd092f1ada1bda10 100644 (file)
@@ -109,6 +109,9 @@ static void SwitchContext( vout_thread_t * );
     "set it to 0 for first screen, 1 for the second.")
 
 vlc_module_begin();
+    set_shortname( N_("OpenGL") );
+    set_category( CAT_VIDEO );
+    set_subcategory( SUBCAT_VIDEO_VOUT );
     set_description( _("X11 OpenGL provider") );
     set_capability( "opengl provider", 50 );
     set_callbacks( CreateOpenGL, DestroyOpenGL );
@@ -176,16 +179,15 @@ static void DestroyOpenGL( vlc_object_t *p_this )
  *****************************************************************************/
 static int CheckGLX( vlc_object_t *p_this, vlc_bool_t *b_glx13 )
 {
-    Display *p_display;
-    int i_opcode, i_evt, i_err;
-    int i_maj, i_min;
+    Display *p_display = NULL;
+    int i_opcode, i_evt, i_err = 0;
+    int i_maj, i_min = 0;
 
     /* Open the display */
     p_display = XOpenDisplay( NULL );
-    if( !p_display )
+    if( p_display == NULL )
     {
         msg_Err( p_this, "Cannot open display" );
-        XCloseDisplay( p_display );
         return VLC_EGENERIC;
     }