X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess_output%2Fhttp.c;h=fff220d4a19b88b343063083dcf9bf48fc4cd0a9;hb=ea93da268c6617a0c5c98a2125b9aa27eba19d6d;hp=3e19577bc36231a0186f55f79ae1cf26c996fa8b;hpb=27d483e9ef7a451397d7857251c8d67097661f1d;p=vlc diff --git a/modules/access_output/http.c b/modules/access_output/http.c index 3e19577bc3..fff220d4a1 100644 --- a/modules/access_output/http.c +++ b/modules/access_output/http.c @@ -30,7 +30,7 @@ # include "config.h" #endif -#include +#include #include #include #include @@ -92,7 +92,7 @@ static void Close( vlc_object_t * ); vlc_module_begin(); - set_description( _("HTTP stream output") ); + set_description( N_("HTTP stream output") ); set_capability( "sout access", 0 ); set_shortname( "HTTP" ); add_shortcut( "http" ); @@ -123,7 +123,7 @@ vlc_module_end(); /***************************************************************************** * Exported prototypes *****************************************************************************/ -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "user", "pwd", "mime", "cert", "key", "ca", "crl", NULL }; @@ -165,16 +165,13 @@ static int Open( vlc_object_t *p_this ) char *psz_user = NULL; char *psz_pwd = NULL; char *psz_mime = NULL; - const char *psz_cert = NULL, *psz_key = NULL, *psz_ca = NULL, + char *psz_cert = NULL, *psz_key = NULL, *psz_ca = NULL, *psz_crl = NULL; vlc_value_t val; if( !( p_sys = p_access->p_sys = malloc( sizeof( sout_access_out_sys_t ) ) ) ) - { - msg_Err( p_access, "Not enough memory" ); return VLC_ENOMEM ; - } config_ChainParse( p_access, SOUT_CFG_PREFIX, ppsz_sout_options, p_access->p_cfg ); @@ -244,6 +241,11 @@ static int Open( vlc_object_t *p_this ) psz_bind_addr, i_bind_port, psz_cert, psz_key, psz_ca, psz_crl ); + free( psz_cert ); + free( psz_key ); + free( psz_ca ); + free( psz_crl ); + if( p_sys->p_httpd_host == NULL ) { msg_Err( p_access, "cannot listen on %s:%d", @@ -312,7 +314,7 @@ static int Open( vlc_object_t *p_this ) if( psz_file_name && asprintf( &psz_txt, "path=%s", psz_file_name ) == -1 ) { - pl_Release( p_playlist ); + pl_Release( p_access ); free( psz_uri ); return VLC_ENOMEM; } @@ -326,7 +328,7 @@ static int Open( vlc_object_t *p_this ) if( p_sys->p_bonjour == NULL ) msg_Err( p_access, "unable to start requested Bonjour announce" ); - pl_Release( p_playlist ); + pl_Release( p_access ); } else p_sys->p_bonjour = NULL;