]> git.sesse.net Git - vlc/blobdiff - modules/video_output/msw/directx.c
Check malloc return value when needed and don't print an error when such error happend.
[vlc] / modules / video_output / msw / directx.c
index cc3a3837def8aec0e0eff893ec7fbb97288185af..ec72dcd1342780750fd95a38feb32b32aff47530 100644 (file)
@@ -41,6 +41,7 @@
 #endif
 
 #include <vlc/vlc.h>
+#include <vlc_plugin.h>
 #include <vlc_interface.h>
 #include <vlc_playlist.h>
 #include <vlc_vout.h>
@@ -178,7 +179,7 @@ vlc_module_begin();
     add_bool( "directx-wallpaper", 0, NULL, WALLPAPER_TEXT, WALLPAPER_LONGTEXT,
               true );
 
-    set_description( _("DirectX video output") );
+    set_description( N_("DirectX video output") );
     set_capability( "video output", 100 );
     add_shortcut( "directx" );
     set_callbacks( OpenVideo, CloseVideo );
@@ -209,10 +210,7 @@ static int OpenVideo( 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;
-    }
     memset( p_vout->p_sys, 0, sizeof( vout_sys_t ) );
 
     /* Initialisations */
@@ -280,7 +278,7 @@ static int OpenVideo( vlc_object_t *p_this )
         vlc_object_create( p_vout, sizeof(event_thread_t) );
     p_vout->p_sys->p_event->p_vout = p_vout;
     if( vlc_thread_create( p_vout->p_sys->p_event, "Vout Events Thread",
-                           E_(EventThread), 0, 1 ) )
+                           EventThread, 0, 1 ) )
     {
         msg_Err( p_vout, "cannot create Vout EventThread" );
         vlc_object_release( p_vout->p_sys->p_event );
@@ -403,7 +401,7 @@ static int Init( vout_thread_t *p_vout )
     p_vout->output.i_height = p_vout->render.i_height;
     p_vout->output.i_aspect = p_vout->render.i_aspect;
     p_vout->fmt_out = p_vout->fmt_in;
-    E_(UpdateRects)( p_vout, true );
+    UpdateRects( p_vout, true );
 
 #define MAX_DIRECTBUFFERS 1
     /* Right now we use only 1 directbuffer because we don't want the
@@ -609,7 +607,7 @@ static int Manage( vout_thread_t *p_vout )
         p_vout->fmt_out.i_sar_num = p_vout->fmt_in.i_sar_num;
         p_vout->fmt_out.i_sar_den = p_vout->fmt_in.i_sar_den;
         p_vout->output.i_aspect = p_vout->fmt_in.i_aspect;
-        E_(UpdateRects)( p_vout, true );
+        UpdateRects( p_vout, true );
     }
 
     /* We used to call the Win32 PeekMessage function here to read the window
@@ -1058,7 +1056,7 @@ static int DirectXCreateDisplay( vout_thread_t *p_vout )
     p_vout->p_sys->i_rgb_colorkey =
         DirectXFindColorkey( p_vout, &p_vout->p_sys->i_colorkey );
 
-    E_(UpdateRects)( p_vout, true );
+    UpdateRects( p_vout, true );
 
     return VLC_SUCCESS;
 }