]> git.sesse.net Git - vlc/blobdiff - modules/video_output/x11/xcommon.c
Check malloc return value when needed and don't print an error when such error happend.
[vlc] / modules / video_output / x11 / xcommon.c
index b37ae25e79df60203b260edb6a77b5fe87e77d66..be72fc9bb0620f86f8939267d09d07a9aa1d7669 100644 (file)
@@ -206,10 +206,7 @@ int Activate ( vlc_object_t *p_this )
     /* Allocate structure */
     p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
     if( p_vout->p_sys == NULL )
-    {
-        msg_Err( p_vout, "out of memory" );
         return VLC_ENOMEM;
-    }
 
     vlc_mutex_init( &p_vout->p_sys->lock );
 
@@ -1493,17 +1490,8 @@ static int ManageVideo( vout_thread_t *p_vout )
      */
     if ( p_vout->i_changes & VOUT_FULLSCREEN_CHANGE )
     {
-        vlc_value_t val_fs, val_ontop;
-
         /* Update the object variable and trigger callback */
-        val_fs.b_bool = !p_vout->b_fullscreen;
-
-        var_Set( p_vout, "fullscreen", val_fs );
-
-        /* Disable "always on top" in fullscreen mode */
-        var_Get( p_vout, "video-on-top", &val_ontop );
-        if( val_ontop.b_bool )
-            WindowOnTop( p_vout, !val_fs.b_bool );
+        var_SetBool( p_vout, "fullscreen", !p_vout->b_fullscreen );
 
         ToggleFullScreen( p_vout );
         p_vout->i_changes &= ~VOUT_FULLSCREEN_CHANGE;
@@ -2951,10 +2939,7 @@ static IMAGE_TYPE * CreateImage( vout_thread_t *p_vout,
     p_data = malloc( i_bytes_per_line * i_height );
 #endif
     if( !p_data )
-    {
-        msg_Err( p_vout, "out of memory" );
         return NULL;
-    }
 
 #ifdef MODULE_NAME_IS_x11
     /* Optimize the quantum of a scanline regarding its size - the quantum is
@@ -3018,8 +3003,13 @@ static int X11ErrorHandler( Display * display, XErrorEvent * event )
         return i_shm_major = 0;
 #endif
 
+#ifndef HAVE_OSSO
     XSetErrorHandler(NULL);
     return (XSetErrorHandler(X11ErrorHandler))( display, event );
+#else
+    /* Work-around Maemo Xvideo bug */
+    return 0;
+#endif
 }
 
 #ifdef MODULE_NAME_IS_x11