- var_Get( p_stream, SOUT_CFG_PREFIX "access", &val );
- psz_access = *val.psz_string ? val.psz_string : NULL;
- if( !*val.psz_string ) free( val.psz_string );
-
- var_Get( p_stream, SOUT_CFG_PREFIX "mux", &val );
- psz_mux = *val.psz_string ? val.psz_string : NULL;
- if( !*val.psz_string ) free( val.psz_string );
-
- var_Get( p_stream, SOUT_CFG_PREFIX "bind", &val );
- psz_bind = *val.psz_string ? val.psz_string : NULL;
- if( !*val.psz_string ) free( val.psz_string);
+ psz_access = var_GetString( p_stream, SOUT_CFG_PREFIX "access" );
+ if( EMPTY_STR(psz_access) )
+ {
+ if( !strcmp( p_stream->psz_name, "http" ) )
+ {
+ psz_access = strdup("http");
+ }
+ else if (!strcmp (p_stream->psz_name, "udp"))
+ {
+ psz_access = strdup("udp");
+ }
+ else if (!strcmp (p_stream->psz_name, "file"))
+ {
+ psz_access = strdup("file");
+ }
+ }