]> git.sesse.net Git - vlc/blobdiff - modules/video_output/opengl.c
pda gui: Set prio to 0, so it is not eligible for automatic selection. This is bad...
[vlc] / modules / video_output / opengl.c
index 504ae30cd9a3c52ee1b8832d3559d84f80fe71ee..32d56e256f6af68184698eb381855b16bbc7e196 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <errno.h>                                                 /* ENOMEM */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <errno.h>                                                 /* ENOMEM */
+
+#include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_vout.h>
 
     #define SIGN(x)     (x < 0 ? (-1) : 1)
     #define PID2     1.570796326794896619231322
 
-    static const char *ppsz_effects[] = {
+    static const char *const ppsz_effects[] = {
             "none", "cube", "transparent-cube", "cylinder", "torus", "sphere","SQUAREXY","SQUARER", "ASINXY", "ASINR", "SINEXY", "SINER" };
-    static const char *ppsz_effects_text[] = {
+    static const char *const ppsz_effects_text[] = {
             N_("None"), N_("Cube"), N_("Transparent Cube"),
             N_("Cylinder"), N_("Torus"), N_("Sphere"), N_("SQUAREXY"),N_("SQUARER"), N_("ASINXY"), N_("ASINR"), N_("SINEXY"), N_("SINER") };
 #endif
@@ -175,9 +176,9 @@ static void Transform    ( int, float, float, int, int, int, int, double *, doub
     "Several visual OpenGL effects are available." )
 
 #ifndef OPENGL_MORE_EFFECT
-static const char *ppsz_effects[] = {
+static const char *const ppsz_effects[] = {
         "none", "cube", "transparent-cube" };
-static const char *ppsz_effects_text[] = {
+static const char *const ppsz_effects_text[] = {
         N_("None"), N_("Cube"), N_("Transparent Cube") };
 #endif
 
@@ -250,10 +251,7 @@ static int CreateVout( vlc_object_t *p_this )
     /* Allocate structure */
     p_vout->p_sys = p_sys = malloc( sizeof( vout_sys_t ) );
     if( p_sys == NULL )
-    {
-        msg_Err( p_vout, "out of memory" );
-        return VLC_EGENERIC;
-    }
+        return VLC_ENOMEM;
 
     var_Create( p_vout, "opengl-effect", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
 
@@ -409,17 +407,11 @@ static int Init( vout_thread_t *p_vout )
     p_sys->pp_buffer[0] =
         malloc( p_sys->i_tex_width * p_sys->i_tex_height * i_pixel_pitch );
     if( !p_sys->pp_buffer[0] )
-    {
-        msg_Err( p_vout, "out of memory" );
         return -1;
-    }
     p_sys->pp_buffer[1] =
         malloc( p_sys->i_tex_width * p_sys->i_tex_height * i_pixel_pitch );
     if( !p_sys->pp_buffer[1] )
-    {
-        msg_Err( p_vout, "out of memory" );
         return -1;
-    }
 
     p_vout->p_picture[0].i_planes = 1;
     p_vout->p_picture[0].p->p_pixels = p_sys->pp_buffer[0];
@@ -574,7 +566,6 @@ static void DestroyVout( vlc_object_t *p_this )
     vout_sys_t *p_sys = p_vout->p_sys;
 
     module_Unneed( p_sys->p_vout, p_sys->p_vout->p_module );
-    vlc_object_detach( p_sys->p_vout );
     vlc_object_release( p_sys->p_vout );
 
     free( p_sys );