int i_source_channel_offset;
unsigned int i;
- if( p_data == NULL )
- {
- msg_Dbg( p_this, "passing a null pointer as argument" );
- return 0;
- }
-
if( config_GetInt( p_this, "headphone-compensate" ) )
{
/* minimal distance to any speaker */
}
}
p_data->p_overflow_buffer = malloc( p_data->i_overflow_buffer_size );
- if( p_data->p_atomic_operations == NULL )
+ if( p_data->p_overflow_buffer == NULL )
+ {
+ free( p_data->p_atomic_operations );
return -1;
+ }
memset( p_data->p_overflow_buffer, 0 , p_data->i_overflow_buffer_size );
- /* end */
return 0;
}
AOUT_CHAN_REARLEFT |
AOUT_CHAN_REARRIGHT;
}
- if( ! b_fit )
+
+ if( !b_fit )
{
msg_Dbg( p_filter, "requesting specific format" );
return VLC_EGENERIC;
, p_filter->input.i_physical_channels
, p_filter->input.i_rate ) < 0 )
{
+ free( p_filter->p_sys );
return VLC_EGENERIC;
}
if( p_filter->p_sys != NULL )
{
- if( p_filter->p_sys->p_overflow_buffer != NULL )
- {
- free( p_filter->p_sys->p_overflow_buffer );
- }
- if( p_filter->p_sys->p_atomic_operations != NULL )
- {
- free( p_filter->p_sys->p_atomic_operations );
- }
+ free( p_filter->p_sys->p_overflow_buffer );
+ free( p_filter->p_sys->p_atomic_operations );
free( p_filter->p_sys );
p_filter->p_sys = NULL;
}
, p_filter->fmt_in.audio.i_physical_channels
, p_filter->fmt_in.audio.i_rate ) < 0 )
{
+ free( p_filter->p_sys );
return VLC_EGENERIC;
}
if( p_filter->p_sys != NULL )
{
- if( p_filter->p_sys->p_overflow_buffer != NULL )
- {
- free ( p_filter->p_sys->p_overflow_buffer );
- }
- if( p_filter->p_sys->p_atomic_operations != NULL )
- {
- free ( p_filter->p_sys->p_atomic_operations );
- }
+ free( p_filter->p_sys->p_overflow_buffer );
+ free( p_filter->p_sys->p_atomic_operations );
free( p_filter->p_sys );
p_filter->p_sys = NULL;
}
int i_source_channel_offset;
unsigned int i;
- if( p_data == NULL )
- {
- msg_Dbg( p_this, "passing a null pointer as argument" );
- return 0;
- }
-
if( config_GetInt( p_this, "headphone-compensate" ) )
{
/* minimal distance to any speaker */
}
}
p_data->p_overflow_buffer = malloc( p_data->i_overflow_buffer_size );
- if( p_data->p_atomic_operations == NULL )
+ if( p_data->p_overflow_buffer == NULL )
+ {
+ free( p_data->p_atomic_operations );
return -1;
+ }
memset( p_data->p_overflow_buffer, 0, p_data->i_overflow_buffer_size );
/* end */
p_filter->fmt_in.audio.i_physical_channels,
p_filter->fmt_in.audio.i_rate ) < 0 )
{
+ var_Destroy( p_this, MONO_CFG "channel" );
+ var_Destroy( p_this, MONO_CFG "downmix" );
+ free( p_sys );
return VLC_EGENERIC;
}
var_Destroy( p_this, MONO_CFG "channel" );
var_Destroy( p_this, MONO_CFG "downmix" );
+ free( p_sys->p_atomic_operations );
+ free( p_sys->p_overflow_buffer );
free( p_sys );
}