psz_fontfile = val.psz_string;
if( !psz_fontfile || !*psz_fontfile )
{
- if( psz_fontfile ) free( psz_fontfile );
+ free( psz_fontfile );
psz_fontfile = (char *)malloc( PATH_MAX + 1 );
if( !psz_fontfile )
{
p_sys->i_default_font_size = val.i_int;
if( SetFontSize( p_filter, 0 ) != VLC_SUCCESS ) goto error;
- if( psz_fontfile ) free( psz_fontfile );
+ free( psz_fontfile );
p_sys->pp_font_attachments = NULL;
p_sys->i_font_attachments = 0;
error:
if( p_sys->p_face ) FT_Done_Face( p_sys->p_face );
if( p_sys->p_library ) FT_Done_FreeType( p_sys->p_library );
- if( psz_fontfile ) free( psz_fontfile );
+ free( psz_fontfile );
free( p_sys );
return VLC_EGENERIC;
}
else
RenderYUVA( p_filter, p_region_out, p_lines, result.x, result.y );
- if( psz_unicode_orig ) free( psz_unicode_orig );
+ free( psz_unicode_orig );
FreeLines( p_lines );
return VLC_SUCCESS;
error:
- if( psz_unicode_orig ) free( psz_unicode_orig );
+ free( psz_unicode_orig );
FreeLines( p_lines );
return VLC_EGENERIC;
}
{
if( p_style )
{
- if( p_style->psz_fontname )
- free( p_style->psz_fontname );
+ free( p_style->psz_fontname );
free( p_style );
}
}
{
if( !strcasecmp( "face", psz_name ) )
{
- if( psz_fontname ) free( psz_fontname );
+ free( psz_fontname );
psz_fontname = strdup( psz_value );
}
else if( !strcasecmp( "size", psz_name ) )
(*ppi_k_run_lengths)[ *pi_k_runs - 1 ] = 0;
}
}
- if( psz_name ) free( psz_name );
- if( psz_value ) free( psz_value );
+ free( psz_name );
+ free( psz_value );
}
}
! p_levels )
{
msg_Err( p_filter, "out of memory" );
- if( p_levels ) free( p_levels );
- if( p_old_positions ) free( p_old_positions );
- if( p_new_positions ) free( p_new_positions );
- if( p_fribidi_string ) free( p_fribidi_string );
- if( pp_char_styles_new ) free( pp_char_styles_new );
- if( pi_karaoke_bar ) free( pi_karaoke_bar );
+ free( p_levels );
+ free( p_old_positions );
+ free( p_new_positions );
+ free( p_fribidi_string );
+ free( pp_char_styles_new );
+ free( pi_karaoke_bar );
free( pp_char_styles );
return VLC_ENOMEM;
i_start_pos += pi_k_run_lengths[ k ];
}
}
- if( p_levels ) free( p_levels );
- if( p_new_positions ) free( p_new_positions );
+ free( p_levels );
+ free( p_new_positions );
FT_Vector tmp_result;
#if defined(HAVE_FRIBIDI)
free( psz_text );
#endif
- if( pi_karaoke_bar )
- free( pi_karaoke_bar );
+ free( pi_karaoke_bar );
return VLC_EGENERIC;
}
free( psz_fontfile );
#if defined(HAVE_FRIBIDI)
free( psz_text );
#endif
- if( pi_karaoke_bar )
- free( pi_karaoke_bar );
+ free( pi_karaoke_bar );
return VLC_EGENERIC;
}
p_sys->i_use_kerning =
#if defined(HAVE_FRIBIDI)
free( psz_text );
#endif
- if( pi_karaoke_bar )
- free( pi_karaoke_bar );
+ free( pi_karaoke_bar );
return VLC_ENOMEM;
}
memcpy( psz_unicode, psz_text + i_prev,
#if defined(HAVE_FRIBIDI)
free( psz_text );
#endif
- if( pi_karaoke_bar )
- free( pi_karaoke_bar );
+ free( pi_karaoke_bar );
return VLC_ENOMEM;
}
/* New Color mode only works in YUVA rendering mode --
#if defined(HAVE_FRIBIDI)
free( psz_text );
#endif
- if( pi_karaoke_bar )
- free( pi_karaoke_bar );
+ free( pi_karaoke_bar );
return VLC_EGENERIC;
}
( p_line->pi_underline_offset == NULL ) ||
( p_line->pi_underline_thickness == NULL ) )
{
- if( p_line->pi_underline_thickness )
- free( p_line->pi_underline_thickness );
- if( p_line->pi_underline_offset ) free( p_line->pi_underline_offset );
- if( p_line->p_fg_rgb ) free( p_line->p_fg_rgb );
- if( p_line->p_bg_rgb ) free( p_line->p_bg_rgb );
- if( p_line->p_fg_bg_ratio ) free( p_line->p_fg_bg_ratio );
- if( p_line->p_glyph_pos ) free( p_line->p_glyph_pos );
- if( p_line->pp_glyphs ) free( p_line->pp_glyphs );
+ free( p_line->pi_underline_thickness );
+ free( p_line->pi_underline_offset );
+ free( p_line->p_fg_rgb );
+ free( p_line->p_bg_rgb );
+ free( p_line->p_fg_bg_ratio );
+ free( p_line->p_glyph_pos );
+ free( p_line->pp_glyphs );
free( p_line );
return NULL;
}
msg_Dbg( p_menu, "freeing menu" );
osd_ButtonFree( p_menu, p_menu->p_button );
- if( p_menu->psz_path ) free( p_menu->psz_path );
- if( p_menu->p_state ) free( p_menu->p_state );
+ free( p_menu->psz_path );
+ free( p_menu->p_state );
p_menu->p_button = NULL;
p_menu->p_last_button = NULL;
p_current = p_prev;
if( p_current->p_next )
{
- if( p_current->p_next->psz_name )
- free( p_current->p_next->psz_name );
- if( p_current->p_next->psz_action )
- free( p_current->p_next->psz_action );
- if( p_current->p_next->psz_action_down )
- free( p_current->p_next->psz_action_down );
- if( p_current->p_feedback && p_current->p_feedback->p_data_orig )
- free( p_current->p_feedback->p_data_orig );
+ free( p_current->p_next->psz_name );
+ free( p_current->p_next->psz_action );
+ free( p_current->p_next->psz_action_down );
if( p_current->p_feedback )
+ {
+ free( p_current->p_feedback->p_data_orig );
free( p_current->p_feedback );
-
- p_current->p_feedback = NULL;
+ p_current->p_feedback = NULL;
+ }
/* Free all states first */
if( p_current->p_next->p_states )
if( p_current->p_up )
{
- if( p_current->p_up->psz_name )
- free( p_current->p_up->psz_name );
- if( p_current->p_up->psz_action )
- free( p_current->p_up->psz_action );
- if( p_current->p_up->psz_action_down )
- free( p_current->p_up->psz_action_down );
- if( p_current->p_feedback && p_current->p_feedback->p_data_orig )
- free( p_current->p_feedback->p_data_orig );
+ free( p_current->p_up->psz_name );
+ free( p_current->p_up->psz_action );
+ free( p_current->p_up->psz_action_down );
if( p_current->p_feedback )
+ {
+ free( p_current->p_feedback->p_data_orig );
free( p_current->p_feedback );
+ }
p_current->p_feedback = NULL;
{
msg_Dbg( p_menu, "+ freeing button %s [%p]",
p_button->psz_action, p_button );
- if( p_button->psz_name ) free( p_button->psz_name );
- if( p_button->psz_action ) free( p_button->psz_action );
- if( p_button->psz_action_down ) free( p_button->psz_action_down );
- if( p_current->p_feedback && p_current->p_feedback->p_data_orig )
- free( p_current->p_feedback->p_data_orig );
+ free( p_button->psz_name );
+ free( p_button->psz_action );
+ free( p_button->psz_action_down );
if( p_current->p_feedback )
+ {
+ free( p_current->p_feedback->p_data_orig );
free( p_current->p_feedback );
- p_current->p_feedback = NULL;
+ p_current->p_feedback = NULL;
+ }
if( p_button->p_states )
osd_StatesFree( p_menu, p_button->p_states );
{
if( p_state->p_next->p_pic )
{
- if( p_state->p_next->p_pic->p_data_orig )
- free( p_state->p_next->p_pic->p_data_orig );
+ free( p_state->p_next->p_pic->p_data_orig );
free( p_state->p_next->p_pic );
}
- if( p_state->p_next->psz_state )
- free( p_state->p_next->psz_state );
+ free( p_state->p_next->psz_state );
free( p_state->p_next );
p_state->p_next = NULL;
}
p_state->psz_state, p_states );
if( p_states->p_pic )
{
- if( p_states->p_pic->p_data_orig )
- free( p_states->p_pic->p_data_orig );
+ free( p_states->p_pic->p_data_orig );
free( p_states->p_pic );
}
- if( p_state->psz_state ) free( p_state->psz_state );
+ free( p_state->psz_state );
free( p_states );
p_states = NULL;
}
msg_Dbg( p_this, " + (menu up) hotkey down %s, file=%s%s",
&action[0], p_menu->psz_path, &file[0] );
- if( p_up->psz_action_down ) free( p_up->psz_action_down );
+ free( p_up->psz_action_down );
p_up->psz_action_down = strdup( &action[0] );
/* Parse range contstruction :
msg_Dbg( p_this, " + hotkey down %s, file=%s%s",
&action[0], p_menu->psz_path, &file[0] );
- if( p_current->psz_action_down )
- free( p_current->psz_action_down );
+ free( p_current->psz_action_down );
p_current->psz_action_down = strdup( &action[0] );
/* Parse range contstruction :
free( p_sys->p_fonts );
}
- if( p_sys->psz_font_name ) free( p_sys->psz_font_name );
-
+ free( p_sys->psz_font_name );
free( p_sys );
}
{
if( !strcasecmp( "face", psz_name ) )
{
- if( psz_fontname ) free( psz_fontname );
+ free( psz_fontname );
psz_fontname = strdup( psz_value );
}
else if( !strcasecmp( "size", psz_name ) )
psz_url = config_GetPsz( p_vod, "rtsp-host" );
vlc_UrlParse( &url, psz_url, 0 );
- if( psz_url ) free( psz_url );
+ free( psz_url );
if( url.i_port <= 0 ) url.i_port = 554;
return VLC_SUCCESS;
error:
- if( p_sys && p_sys->p_rtsp_host ) httpd_HostDelete( p_sys->p_rtsp_host );
- if( p_sys && p_sys->psz_raw_mux ) free( p_sys->psz_raw_mux );
- if( p_sys ) free( p_sys );
+ if( p_sys )
+ {
+ if( p_sys->p_rtsp_host ) httpd_HostDelete( p_sys->p_rtsp_host );
+ free( p_sys->psz_raw_mux );
+ free( p_sys );
+ }
vlc_UrlClean( &url );
return VLC_EGENERIC;
TAB_CLEAN( p_media->i_rtsp, p_media->rtsp );
httpd_UrlDelete( p_media->p_rtsp_url );
- if( p_media->psz_rtsp_path ) free( p_media->psz_rtsp_path );
- if( p_media->psz_rtsp_control_v6 ) free( p_media->psz_rtsp_control_v6 );
- if( p_media->psz_rtsp_control_v4 ) free( p_media->psz_rtsp_control_v4 );
+ free( p_media->psz_rtsp_path );
+ free( p_media->psz_rtsp_control_v6 );
+ free( p_media->psz_rtsp_control_v4 );
while( p_media->i_es )
MediaDelES( p_vod, p_media, &p_media->es[0]->fmt );
vlc_mutex_destroy( &p_media->lock );
- if( p_media->psz_session_name ) free( p_media->psz_session_name );
- if( p_media->psz_session_description )
- free( p_media->psz_session_description );
- if( p_media->psz_session_url ) free( p_media->psz_session_url );
- if( p_media->psz_session_email ) free( p_media->psz_session_email );
- if( p_media->psz_mux ) free( p_media->psz_mux );
+ free( p_media->psz_session_name );
+ free( p_media->psz_session_description );
+ free( p_media->psz_session_url );
+ free( p_media->psz_session_email );
+ free( p_media->psz_mux );
free( p_media );
}
if( !p_es ) return VLC_ENOMEM;
memset( p_es, 0, sizeof(media_es_t) );
- if( p_media->psz_mux ) free( p_media->psz_mux );
+ free( p_media->psz_mux );
p_media->psz_mux = NULL;
/* TODO: update SDP, etc... */
"sprop-parameter-sets=%s,%s;", hexa, p_64_sps,
p_64_pps ) < 0 )
return VLC_ENOMEM;
- if( p_64_sps )
- free( p_64_sps );
- if( p_64_pps )
- free( p_64_pps );
+ free( p_64_sps );
+ free( p_64_pps );
}
if( !p_es->psz_fmtp )
p_es->psz_fmtp = strdup( "packetization-mode=1" );
TAB_REMOVE( p_media->i_es, p_media->es, p_es );
vlc_mutex_unlock( &p_media->lock );
- if( p_es->psz_rtpmap ) free( p_es->psz_rtpmap );
- if( p_es->psz_fmtp ) free( p_es->psz_fmtp );
+ free( p_es->psz_rtpmap );
+ free( p_es->psz_fmtp );
p_media->i_sdp_version++;
if( p_es->p_rtsp_url ) httpd_UrlDelete( p_es->p_rtsp_url );
next:
vlc_mutex_unlock( &p_sys->lock_media );
- if( cmd.psz_session )
- free( cmd.psz_session );
- if( cmd.psz_arg )
- free( cmd.psz_arg );
+ free( cmd.psz_session );
+ free( cmd.psz_arg );
}
}
while( p_rtsp->i_es-- )
{
- if( p_rtsp->es[p_rtsp->i_es]->psz_ip )
- free( p_rtsp->es[p_rtsp->i_es]->psz_ip );
+ free( p_rtsp->es[p_rtsp->i_es]->psz_ip );
free( p_rtsp->es[p_rtsp->i_es] );
if( !p_rtsp->i_es ) free( p_rtsp->es );
}
if( strstr( psz_transport, "MP2T/H2221/UDP" ) ||
strstr( psz_transport, "RAW/RAW/UDP" ) )
{
- if( p_media->psz_mux ) free( p_media->psz_mux );
+ free( p_media->psz_mux );
p_media->psz_mux = NULL;
p_media->psz_mux = strdup( p_vod->p_sys->psz_raw_mux );
p_media->b_raw = VLC_TRUE;
{
if( p_rtsp->es[i]->p_media_es == p_es )
{
- if( p_rtsp->es[i]->psz_ip ) free( p_rtsp->es[i]->psz_ip );
+ free( p_rtsp->es[i]->psz_ip );
TAB_REMOVE( p_rtsp->i_es, p_rtsp->es, p_rtsp->es[i] );
break;
}
p_sys->i_default_font_size = val.i_int;
if( SetFont( p_filter, 0 ) != VLC_SUCCESS ) goto error;
- if( psz_fontfile ) free( psz_fontfile );
+ free( psz_fontfile );
p_filter->pf_render_text = RenderText;
p_filter->pf_render_html = NULL;
return VLC_SUCCESS;
error:
- if( psz_fontfile ) free( psz_fontfile );
+ free( psz_fontfile );
free( p_sys );
return VLC_EGENERIC;
}
i_pos += i_size;
i_buffer += i_size;
p_new = realloc( p_buffer, i_buffer );
- if (!p_new) {
+ if( !p_new )
+ {
msg_Err( p_xml, "out of memory" );
free( p_buffer );
return NULL;
if( xtag == NULL ) return NULL;
- if( xtag->name ) free( xtag->name );
- if( xtag->pcdata ) free( xtag->pcdata );
+ free( xtag->name );
+ free( xtag->pcdata );
for( l = xtag->attributes; l; l = l->next )
{
if( (attr = (XAttribute *)l->data) != NULL )
{
- if( attr->name ) free( attr->name );
- if( attr->value ) free( attr->value );
+ free( attr->name );
+ free( attr->value );
free( attr );
}
}
VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) )
{
msg_Err( p_filter, "cannot lauch galaktos thread" );
- if( p_thread->psz_title ) free( p_thread->psz_title );
+ free( p_thread->psz_title );
vlc_object_detach( p_thread );
vlc_object_release( p_thread );
free( p_sys );
{
vlc_object_kill( p_thread );
}
- if( p_thread->psz_title )
- {
- free( p_thread->psz_title );
- p_thread->psz_title = NULL;
- }
+ free( p_thread->psz_title );
+ p_thread->psz_title = NULL;
if (++count%100==0)
{
vout_Destroy( p_thread->p_vout );
vlc_mutex_destroy( &p_thread->lock );
vlc_cond_destroy( &p_thread->wait );
- if( p_thread->psz_title ) free( p_thread->psz_title );
+ free( p_thread->psz_title );
vlc_object_detach( p_thread );
vlc_object_release( p_thread );
free( p_sys );
plane = goom_update( p_plugin_info, p_data, 0, 0.0,
p_thread->psz_title, NULL );
- if( p_thread->psz_title )
- {
- free( p_thread->psz_title );
- p_thread->psz_title = NULL;
- }
+ free( p_thread->psz_title );
+ p_thread->psz_title = NULL;
while( !( p_pic = vout_CreatePicture( p_thread->p_vout, 0, 0, 0 ) ) &&
!p_thread->b_die )
fft_close( p_state );
- if( p_s16_buff != NULL )
- {
- free( p_s16_buff );
- p_s16_buff = NULL;
- }
-
- if(height) free(height);
+ free( p_s16_buff );
+ p_s16_buff = NULL;
- if(psz_parse) free(psz_parse);
+ free( height );
+ free( psz_parse );
return 0;
}
fft_close( p_state );
- if( p_s16_buff != NULL )
- {
- free( p_s16_buff );
- p_s16_buff = NULL;
- }
-
- if(height) free(height);
+ free( p_s16_buff );
+ p_s16_buff = NULL;
- if(psz_parse) free(psz_parse);
+ free( height );
+ free( psz_parse );
return 0;
}
* Free the state.
*/
void fft_close(fft_state *state) {
- if(state) free(state);
+ free( state );
}
/*****************************************************************************