]> git.sesse.net Git - vlc/blobdiff - modules/access_output/shout.c
Fix preferences for jack (avoid the double 'pace' text)
[vlc] / modules / access_output / shout.c
index 3dcdab076358e32468f2e65e0d030c4413dd85e8..ad72311c0758d037dac2743e40de8f9ef2be9b56 100644 (file)
@@ -45,7 +45,8 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_sout.h>
 #include <vlc_block.h>
 
@@ -106,7 +107,7 @@ static void Close( vlc_object_t * );
                            "shoutcast. Requires Ogg streaming for icecast." )
 
 vlc_module_begin();
-    set_description( _("IceCAST output") );
+    set_description( N_("IceCAST output") );
     set_shortname( "Shoutcast" );
     set_capability( "sout access", 50 );
     set_category( CAT_SOUT );
@@ -139,7 +140,7 @@ vlc_module_end();
 /*****************************************************************************
  * Exported prototypes
  *****************************************************************************/
-static const char *ppsz_sout_options[] = {
+static const char *const ppsz_sout_options[] = {
     "name", "description", "mp3", "genre", "url", "bitrate", "samplerate",
     "channels", "quality", "public", NULL
 };
@@ -183,6 +184,8 @@ static int Open( vlc_object_t *p_this )
     config_ChainParse( p_access, SOUT_CFG_PREFIX, ppsz_sout_options, p_access->p_cfg );
 
     psz_accessname = psz_parser = strdup( p_access->psz_path );
+    if( !psz_parser )
+        return VLC_ENOMEM;
 
     if( !p_access->psz_path )
     {
@@ -211,7 +214,6 @@ static int Open( vlc_object_t *p_this )
     p_sys = p_access->p_sys = malloc( sizeof( sout_access_out_sys_t ) );
     if( !p_sys )
     {
-        msg_Err( p_access, "out of memory" );
         free( psz_accessname );
         return VLC_ENOMEM;
     }
@@ -525,6 +527,8 @@ static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
             else
             {
                 msg_Err( p_access, "failed to reconnect to server" );
+                block_ChainRelease (p_buffer);
+                return VLC_EGENERIC;
             }
 
         }