]> git.sesse.net Git - vlc/blobdiff - modules/codec/sdl_image.c
svg module: fix memleak.
[vlc] / modules / codec / sdl_image.c
index 39c53ac9ee35038fa9fe3ed0f7a9ab07a9ded10d..82022e8873ebecde84bfd913f6e2901ebe3b4684 100644 (file)
@@ -28,7 +28,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_codec.h>
 #include <vlc_vout.h>
@@ -57,8 +57,8 @@ static picture_t *DecodeBlock  ( decoder_t *, block_t ** );
 vlc_module_begin();
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_VCODEC );
-    set_shortname( _("SDL Image decoder"));
-    set_description( _("SDL_image video decoder") );
+    set_shortname( N_("SDL Image decoder"));
+    set_description( N_("SDL_image video decoder") );
     set_capability( "decoder", 60 );
     set_callbacks( OpenDecoder, CloseDecoder );
     add_shortcut( "sdl_image" );
@@ -108,10 +108,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     /* Allocate the memory needed to store the decoder's structure */
     if( ( p_dec->p_sys = p_sys =
           (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL )
-    {
-        msg_Err( p_dec, "out of memory" );
-        return VLC_EGENERIC;
-    }
+        return VLC_ENOMEM;
     p_sys->psz_sdl_type = p_supported_fmt[i].psz_sdl_type;
 
     /* Set output properties - this is a decoy and isn't used anywhere */