for( i = 0; i < p_meta->i_record_entries_count; i++ )
{
- if( p_meta->record[i].psz_name ) free( p_meta->record[i].psz_name );
- if( p_meta->record[i].p_data ) free( p_meta->record[i].p_data );
+ free( p_meta->record[i].psz_name );
+ free( p_meta->record[i].p_data );
}
- if( p_meta->record ) free( p_meta->record );
+ free( p_meta->record );
}
static int ASF_ReadObject_metadata( stream_t *s, asf_object_t *p_obj )
static void AVI_ChunkFree_strd( avi_chunk_t *p_chk )
{
- if( p_chk->strd.p_data ) free( p_chk->strd.p_data );
+ free( p_chk->strd.p_data );
}
static int AVI_ChunkRead_idx1( stream_t *s, avi_chunk_t *p_chk )
vlc_object_detach( 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_detach( 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 );
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;
psz += strlen(psz)+1;
}
- if( dup ) free( dup );
+ free( dup );
return cfg;
}
delete tracks[i_track]->p_compression_data;
}
es_format_Clean( &tracks[i_track]->fmt );
- if( tracks[i_track]->p_extra_data )
- free( tracks[i_track]->p_extra_data );
- if( tracks[i_track]->psz_codec )
- free( tracks[i_track]->psz_codec );
+ free( tracks[i_track]->p_extra_data );
+ free( tracks[i_track]->psz_codec );
delete tracks[i_track];
}
- if( psz_writing_application )
- {
- free( psz_writing_application );
- }
- if( psz_muxing_application )
- {
- free( psz_muxing_application );
- }
- if( psz_segment_filename )
- {
- free( psz_segment_filename );
- }
- if( psz_title )
- {
- free( psz_title );
- }
- if( psz_date_utc )
- {
- free( psz_date_utc );
- }
- if ( p_indexes )
- free( p_indexes );
+ free( psz_writing_application );
+ free( psz_muxing_application );
+ free( psz_segment_filename );
+ free( psz_title );
+ free( psz_date_utc );
+ free( p_indexes );
delete ep;
delete segment;
{}
virtual ~attachment_c()
{
- if( p_data ) free( p_data );
+ free( p_data );
}
std::string psz_file_name;
msg_Err( p_demux, "unknown ref type=%4.4s FIXME (send a bug report)",
(char*)&p_rdrf->data.p_rdrf->i_ref_type );
}
- if( psz_ref ) free( psz_ref );
+ free( psz_ref );
}
if( b_play && p_item_in_category &&
p_item_in_category->i_children > 0 )
if( psz_out )
{
msg_Dbg( p_demux, "%s = %s", psz_bol, psz_out );
- if( psz_out) free( psz_out );
+ free( psz_out );
}
}
return VLC_SUCCESS;
while( ( psz_line = stream_ReadLine( p_demux->s ) ) )
{
ParseLine( p_demux, psz_line );
- if( psz_line ) free( psz_line );
+ free( psz_line );
}
return VLC_SUCCESS;
}
p_ogg->i_bitrate -= p_stream->fmt.i_bitrate;
ogg_stream_clear( &p_ogg->pp_stream[i_stream]->os );
- if( p_ogg->pp_stream[i_stream]->p_headers)
- free( p_ogg->pp_stream[i_stream]->p_headers );
+ free( p_ogg->pp_stream[i_stream]->p_headers );
es_format_Clean( &p_stream->fmt );
#undef p_stream
/* Reinit p_ogg */
- if( p_ogg->pp_stream ) free( p_ogg->pp_stream );
+ free( p_ogg->pp_stream );
p_ogg->pp_stream = NULL;
p_ogg->i_streams = 0;
}
demux_sys_t *p_sys = p_demux->p_sys;
unsigned len = psz_source_end - psz_source_start;
- if( *ppsz_string ) free( *ppsz_string );
+ free( *ppsz_string );
char *buf = *ppsz_string = malloc ((len * (1 + !p_sys->b_utf8)) + 1);
if (buf == NULL)
demux_t *p_demux = (demux_t *)p_this;
demux_sys_t *p_sys = p_demux->p_sys;
- if( p_sys->psz_prefix ) free( p_sys->psz_prefix );
- if( p_sys->psz_data ) free( p_sys->psz_data );
+ free( p_sys->psz_prefix );
+ free( p_sys->psz_data );
free( p_sys );
}
demux_t *p_demux = (demux_t *)p_this;
demux_sys_t *p_sys = p_demux->p_sys;
- if( p_sys->psz_prefix ) free( p_sys->psz_prefix );
+ free( p_sys->psz_prefix );
if( p_sys->p_xml_reader ) xml_ReaderDelete( p_sys->p_xml, p_sys->p_xml_reader );
if( p_sys->p_xml ) xml_Delete( p_sys->p_xml );
free( p_sys );
if( !p_xml ) return -1;
psz_elname = stream_ReadLine( p_demux->s );
- if( psz_elname ) free( psz_elname );
+ free( psz_elname );
psz_elname = 0;
p_xml_reader = xml_ReaderCreate( p_xml, p_demux->s );
{
msg_Err( p_demux, "invalid root node %i, %s",
xml_ReaderNodeType( p_xml_reader ), psz_elname );
- if( psz_elname ) free( psz_elname );
+ free( psz_elname );
vlc_object_release( p_playlist );
return -1;
}
strcmp( psz_elname, "playlist" ) )
{
msg_Err( p_demux, "invalid child node %s", psz_elname );
- if( psz_elname ) free( psz_elname );
+ free( psz_elname );
return -1;
}
free( psz_elname ); psz_elname = 0;
case XML_READER_STARTELEM:
{
// Read the element name
- if( psz_elname ) free( psz_elname );
+ free( psz_elname );
psz_elname = xml_ReaderName( p_xml_reader );
if( !psz_elname ) return -1;
input_ItemAddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
while( i_options-- ) free( ppsz_options[i_options] );
- if( ppsz_options ) free( ppsz_options );
+ free( ppsz_options );
free( psz_line );
}
{
/* This isn't a valid channels file, cleanup everything */
while( (*pi_options)-- ) free( (*pppsz_options)[*pi_options] );
- if( *pppsz_options ) free( *pppsz_options );
+ free( *pppsz_options );
*pppsz_options = 0; *pi_options = 0;
}
{
/* Cleanup state */
while( i_options-- ) free( (char*)ppsz_options[i_options] );
- if( ppsz_options ) free( ppsz_options );
+ free( ppsz_options );
ppsz_options = NULL; i_options = 0;
- if( psz_name ) free( psz_name );
+ free( psz_name );
psz_name = NULL;
- if ( psz_artist ) free( psz_artist );
+ free( psz_artist );
psz_artist = NULL;
i_parsed_duration = 0;
i_duration = -1;
demux_t *p_demux = (demux_t *)p_this;
demux_sys_t *p_sys = p_demux->p_sys;
- if( p_sys->psz_prefix ) free( p_sys->psz_prefix );
+ free( p_sys->psz_prefix );
if( p_sys->p_playlist ) vlc_object_release( p_sys->p_playlist );
if( p_sys->p_xml_reader ) xml_ReaderDelete( p_sys->p_xml, p_sys->p_xml_reader );
if( p_sys->p_xml ) xml_Delete( p_sys->p_xml );
{
msg_Err( p_demux, "invalid root node %i, %s",
xml_ReaderNodeType( p_xml_reader ), psz_elname );
- if( psz_elname ) free( psz_elname );
+ free( psz_elname );
return -1;
}
free( psz_elname ); psz_elname = NULL;
case XML_READER_STARTELEM:
{
// Read the element name
- if( psz_elname ) free( psz_elname );
+ free( psz_elname );
psz_elname = xml_ReaderName( p_xml_reader );
if( !psz_elname ) return -1;
{
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys = p_demux->p_sys;
- if( p_sys->psz_uri )
- free( p_sys->psz_uri );
- if( p_sys->psz_server )
- free( p_sys->psz_server );
- if( p_sys->psz_location )
- free( p_sys->psz_location );
- if( p_sys->psz_name )
- free( p_sys->psz_name );
- if( p_sys->psz_user )
- free( p_sys->psz_user );
- if( p_sys->psz_password )
- free( p_sys->psz_password );
- if( p_sys->psz_mcast_ip )
- free( p_sys->psz_mcast_ip );
+ free( p_sys->psz_uri );
+ free( p_sys->psz_server );
+ free( p_sys->psz_location );
+ free( p_sys->psz_name );
+ free( p_sys->psz_user );
+ free( p_sys->psz_password );
+ free( p_sys->psz_mcast_ip );
free( p_demux->p_sys );
return;
}
while( ( psz_line = stream_ReadLine( p_demux->s ) ) )
{
ParseLine( p_demux, psz_line );
- if( psz_line ) free( psz_line );
+ free( psz_line );
}
if( p_sys->psz_mcast_ip )
char *temp;
asprintf( &temp, "udp://@" "%s:%i", p_sys->psz_mcast_ip, p_sys->i_mcast_port );
- if( p_sys->psz_uri ) free( p_sys->psz_uri );
+ free( p_sys->psz_uri );
p_sys->psz_uri = strdup( temp );
free( temp );
}
{
msg_Err( p_demux, "invalid root node %i, %s",
xml_ReaderNodeType( p_xml_reader ), psz_eltname );
- if( psz_eltname ) free( psz_eltname );
+ free( psz_eltname );
return -1;
}
{
while( p_psm->i_es-- )
{
- if( p_psm->es[p_psm->i_es]->i_descriptor )
- free( p_psm->es[p_psm->i_es]->p_descriptor );
+ free( p_psm->es[p_psm->i_es]->p_descriptor );
free( p_psm->es[p_psm->i_es] );
}
- if( p_psm->es ) free( p_psm->es );
+ free( p_psm->es );
p_psm->es = 0;
p_psm->i_es = 0;
free( tk );
}
- if( p_sys->psz_title ) free( p_sys->psz_title );
- if( p_sys->psz_artist ) free( p_sys->psz_artist );
- if( p_sys->psz_copyright ) free( p_sys->psz_copyright );
- if( p_sys->psz_description ) free( p_sys->psz_description );
+ free( p_sys->psz_title );
+ free( p_sys->psz_artist );
+ free( p_sys->psz_copyright );
+ free( p_sys->psz_description );
if( p_sys->i_track > 0 ) free( p_sys->track );
free( p_sys );
s = NULL;
}
- if( s ) free( s );
+ free( s );
/* It will nearly always work even for non seekable stream thanks the
* caching system, and if it fails we lose just a few sub */
sizeof(subtitle_t) * i_max ) ) )
{
msg_Err( p_demux, "out of memory");
- if( p_sys->subtitle != NULL )
- free( p_sys->subtitle );
+ free( p_sys->subtitle );
TextUnload( &p_sys->txt );
free( p_sys );
return VLC_ENOMEM;
int i;
for( i = 0; i < p_sys->i_subtitles; i++ )
- {
- if( p_sys->subtitle[i].psz_text )
- free( p_sys->subtitle[i].psz_text );
- }
- if( p_sys->subtitle )
- free( p_sys->subtitle );
+ free( p_sys->subtitle[i].psz_text );
+ free( p_sys->subtitle );
free( p_sys );
}
p_sys->buffer = malloc( p_sys->i_packet_size * p_sys->i_ts_read );
}
}
- if( val.psz_string )
- {
- free( val.psz_string );
- }
+ free( val.psz_string );
/* We handle description of an extra PMT */
var_Create( p_demux, "ts-extra-pmt", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
}
}
}
- if( val.psz_string )
- {
- free( val.psz_string );
- }
+ free( val.psz_string );
var_Create( p_demux, "ts-csa-ck", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
var_Get( p_demux, "ts-csa-ck", &val );
}
}
}
- if( val.psz_string )
- {
- free( val.psz_string );
- }
+ free( val.psz_string );
var_Create( p_demux, "ts-silent", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
var_Get( p_demux, "ts-silent", &val );
dvbpsi_DetachPMT( pid->psi->prg[i]->handle );
free( pid->psi->prg[i] );
}
- if( pid->psi->prg ) free( pid->psi->prg );
+ free( pid->psi->prg );
free( pid->psi );
}
else
strcat( psz_extra, psz_itm );
strcat( psz_extra, ")" );
}
- if( psz_dsc )
- free( psz_dsc );
- if( psz_itm )
- free( psz_itm );
+ free( psz_dsc );
+ free( psz_itm );
}
}
}
if( p_evt->i_running_status == 0x04 && i_start > 0 )
vlc_epg_SetCurrent( p_epg, i_start );
- if( psz_name )
- free( psz_name );
- if( psz_text )
- free( psz_text );
+ free( psz_name );
+ free( psz_text );
free( psz_extra );
}
TAB_REMOVE( p_sys->i_pmt, p_sys->pmt, pmt_rm[i] );
}
- if( pmt_rm ) free( pmt_rm );
+ free( pmt_rm );
}
/* now create programs */
/* Clean all subs from all tracks */
for( i = 0; i < p_sys->i_tracks; i++ )
- {
- if( p_sys->track[i].p_subtitles ) free( p_sys->track[i].p_subtitles );
- }
- if( p_sys->track ) free( p_sys->track );
+ free( p_sys->track[i].p_subtitles );
+
+ free( p_sys->track );
if( p_sys->p_vobsub_stream )
stream_Delete( p_sys->p_vobsub_stream );
if( txt->i_line_count <= 0 )
{
- if( txt->line ) free( txt->line );
+ free( txt->line );
return VLC_EGENERIC;
}
int i;
for( i = 0; i < txt->i_line_count; i++ )
- {
- if( txt->line[i] ) free( txt->line[i] );
- }
- if( txt->line ) free( txt->line );
+ free( txt->line[i] );
+
+ free( txt->line );
txt->i_line = 0;
txt->i_line_count = 0;
}