+ if( pd->b_icecast )
+ {
+ sout_std_t *p_std;
+ char *psz_username;
+
+ if( p_dup ) streaming_DupAddChild( p_dup );
+
+ if( !strcmp( pd->sa_icecast.psz_username, "" ) )
+ {
+ asprintf( &psz_username, "%s", "" );
+ }
+ else
+ {
+ asprintf( &psz_username, "%s:%s@", pd->sa_icecast.psz_username,
+ pd->sa_icecast.psz_password );
+ }
+ if( pd->i_icecast > 0 )
+ {
+ char *psz_url;
+ asprintf( &psz_url, "%s%s:%i%s", psz_username, pd->psz_icecast,
+ pd->i_icecast, pd->psz_icecast_mountpoint );
+ p_std = streaming_ChainAddStd( DUP_OR_CHAIN, "shout",
+ pd->psz_mux, psz_url );
+ free( psz_url );
+ }
+ else
+ {
+ char *psz_url;
+ asprintf( &psz_url, "%s:%s@%s%s", pd->sa_icecast.psz_username,
+ pd->sa_icecast.psz_password, pd->psz_icecast,
+ pd->psz_icecast_mountpoint );
+ p_std = streaming_ChainAddStd( DUP_OR_CHAIN, "shout",
+ pd->psz_mux, psz_url );
+ free( psz_url );
+ }
+ free( psz_username );
+ }