# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
#include <vlc_sout.h>
#include <vlc_block.h>
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" );
/*****************************************************************************
* Exported prototypes
*****************************************************************************/
-static const char *ppsz_sout_options[] = {
+static const char *const ppsz_sout_options[] = {
"user", "pwd", "mime", "cert", "key", "ca", "crl", NULL
};
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 );
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",
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;
}
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;