if( i_ret != SHOUTERR_SUCCESS )
{
msg_Err( p_access, "failed to set the shoutcast streaming format" );
- free( p_access->p_sys );
- free( psz_accessname );
- return VLC_EGENERIC;
+ goto error;
}
/* Don't force bitrate to 0 but only use when specified. This will otherwise
if( i_ret != SHOUTERR_SUCCESS )
{
msg_Err( p_access, "failed to set the information about the bitrate" );
- free( p_access->p_sys );
- free( psz_accessname );
- return VLC_EGENERIC;
+ goto error;
}
}
else
if( i_ret != SHOUTERR_SUCCESS )
{
msg_Err( p_access, "failed to set the information about the samplerate" );
- free( p_access->p_sys );
- free( psz_accessname );
- return VLC_EGENERIC;
+ goto error;
}
}
if( i_ret != SHOUTERR_SUCCESS )
{
msg_Err( p_access, "failed to set the information about the number of channels" );
- free( p_access->p_sys );
- free( psz_accessname );
- return VLC_EGENERIC;
+ goto error;
}
}
if( i_ret != SHOUTERR_SUCCESS )
{
msg_Err( p_access, "failed to set the information about Ogg Vorbis quality" );
- free( p_access->p_sys );
- free( psz_accessname );
- return VLC_EGENERIC;
+ goto error;
}
}
if( i_ret != SHOUTERR_SUCCESS )
{
msg_Err( p_access, "failed to set the server status setting to public" );
- free( p_access->p_sys );
- free( psz_accessname );
- return VLC_EGENERIC;
+ goto error;
}
}
if( i_ret != SHOUTERR_SUCCESS )
{
msg_Err( p_access, "failed to set the protocol to 'icy'" );
- free( p_access->p_sys );
- free( psz_accessname );
- return VLC_EGENERIC;
+ goto error;
}
i_ret = shout_open( p_shout );
if( i_ret == SHOUTERR_SUCCESS )
if( i_ret != SHOUTERR_SUCCESS )
{
msg_Err( p_access, "failed to set the protocol to 'http'" );
- free( p_access->p_sys );
- free( psz_accessname );
- return VLC_EGENERIC;
+ goto error;
}
i_ret = shout_open( p_shout );
if( i_ret == SHOUTERR_SUCCESS )
free( psz_accessname );
return VLC_SUCCESS;
+
+error:
+ free( psz_accessname );
+ free( p_sys );
+ return VLC_EGENERIC;
}
/*****************************************************************************