#include <vlc_url.h>
#include <iostream>
+#include <limits.h>
#if defined( WIN32 )
# include <winsock2.h>
vlc_object_kill( p_sys->p_timeout );
vlc_thread_join( p_sys->p_timeout );
vlc_object_detach( p_sys->p_timeout );
- vlc_object_destroy( p_sys->p_timeout );
+ vlc_object_release( p_sys->p_timeout );
}
- if( p_sys->scheduler ) delete p_sys->scheduler;
- if( p_sys->p_sdp ) free( p_sys->p_sdp );
- if( p_sys->psz_path ) free( p_sys->psz_path );
+ delete p_sys->scheduler;
+ free( p_sys->p_sdp );
+ free( p_sys->psz_path );
vlc_UrlClean( &p_sys->url );
vlc_object_kill( p_sys->p_timeout );
vlc_thread_join( p_sys->p_timeout );
vlc_object_detach( p_sys->p_timeout );
- vlc_object_destroy( p_sys->p_timeout );
+ vlc_object_release( p_sys->p_timeout );
}
- if( p_sys->scheduler ) delete p_sys->scheduler;
- if( p_sys->p_sdp ) free( p_sys->p_sdp );
- if( p_sys->psz_path ) free( p_sys->psz_path );
+ delete p_sys->scheduler;
+ free( p_sys->p_sdp );
+ free( p_sys->psz_path );
vlc_UrlClean( &p_sys->url );
psz_options = p_sys->rtsp->sendOptionsCmd( psz_url, psz_user, psz_pwd,
&authenticator );
- if( psz_options ) delete [] psz_options;
+ delete [] psz_options;
p_sdp = p_sys->rtsp->describeURL( psz_url, &authenticator,
var_GetBool( p_demux, "rtsp-kasenna" ) );
int i_result;
msg_Dbg( p_demux, "authentication failed" );
- if( psz_user ) free( psz_user );
- if( psz_pwd ) free( psz_pwd );
+ free( psz_user );
+ free( psz_pwd );
psz_user = psz_pwd = NULL;
i_result = intf_UserLoginPassword( p_demux, _("RTSP authentication"),
}
/* malloc-ated copy */
- if( psz_url ) free( psz_url );
- if( psz_user ) free( psz_user );
- if( psz_pwd ) free( psz_pwd );
+ free( psz_url );
+ free( psz_user );
+ free( psz_pwd );
- if( p_sys->p_sdp ) free( p_sys->p_sdp );
+ free( p_sys->p_sdp );
p_sys->p_sdp = NULL;
if( p_sdp ) p_sys->p_sdp = strdup( (char*)p_sdp );
delete[] p_sdp;
VLC_THREAD_PRIORITY_LOW, VLC_TRUE ) )
{
msg_Err( p_demux, "cannot spawn liveMedia timeout thread" );
- vlc_object_destroy( p_sys->p_timeout );
+ vlc_object_release( p_sys->p_timeout );
}
msg_Dbg( p_demux, "spawned timeout thread" );
vlc_object_attach( p_sys->p_timeout, p_demux );
double d_npt = (double) p_sys->i_npt / I64C(1000000);
int i;
- b_bool = (vlc_bool_t)va_arg( args, vlc_bool_t );
+ b_bool = (bool)va_arg( args, int );
if( p_sys->rtsp == NULL )
return VLC_EGENERIC;
psz += strlen(psz)+1;
}
- if( dup ) free( dup );
+ free( dup );
return cfg;
}