[vlc-devel] [PATCH] better libvlc audio handling
Rémi Duraffort
ivoire at via.ecp.fr
Mon Nov 3 19:49:16 CET 2008
Hi,
just a little remark.
In this function:
VLC_PUBLIC_API void libvlc_audio_output_device_set(libvlc_instance_t *p_instance,
const char *psz_audio_output,
const char *psz_device_id )
{
char *psz_config_name = NULL;
if( !psz_audio_output )
return;
if( asprintf( &psz_config_name, "%s-audio-device", psz_audio_output ) == -1 )
return;
if( psz_device_id )
config_PutPsz( p_instance->p_libvlc_int, psz_config_name, psz_device_id );
free( psz_config_name );
}
Why not checking that psz_device_id != NULL at the begining, so if it's
NULL you don't do any malloc+free.
Seams good to me.
And thanks for redoing patch for every remarks !!
--
Rémi Duraffort | ivoire
More information about the vlc-devel
mailing list