* and spawn threads.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: main.c,v 1.183 2002/04/21 18:32:12 sam Exp $
+ * $Id: main.c,v 1.184 2002/04/21 21:29:20 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
p_aout_bank = &aout_bank;
p_vout_bank = &vout_bank;
- p_main->i_warning_level = 0;
-
/*
* Support for gettext
*/
#endif
/* p_main inititalization. FIXME ? */
- p_main->i_desync = (mtime_t)config_GetIntVariable( "desync" )
- * (mtime_t)1000;
+ p_main->i_warning_level = config_GetIntVariable( "warning" );
+ p_main->i_desync = config_GetIntVariable( "desync" ) * (mtime_t)1000;
p_main->b_stats = config_GetIntVariable( "stats" );
p_main->b_audio = !config_GetIntVariable( "noaudio" );
p_main->b_stereo= !config_GetIntVariable( "mono" );
if( p_main->b_stats )
{
- char p_capabilities[200];
+ char p_capabilities[200];
p_capabilities[0] = '\0';
#define PRINT_CAPABILITY( capability, string ) \
* configuration.c management of the modules configuration
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: configuration.c,v 1.17 2002/04/21 18:32:12 sam Exp $
+ * $Id: configuration.c,v 1.18 2002/04/21 21:29:20 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
module_config_t *pp_shortopts[256];
char *psz_shortopts;
+ /* reset warning level */
+ p_main->i_warning_level = 0;
+
/* Set default configuration and copy arguments */
p_main->i_argc = *pi_argc;
p_main->ppsz_argv = ppsz_argv;
}
}
- if( p_main->i_warning_level < 0 )
- {
- p_main->i_warning_level = 0;
- }
-
free( p_longopts );
free( psz_shortopts );
+
+ /* Update the warning level */
+ p_main->i_warning_level += config_GetIntVariable( "warning" );
+ p_main->i_warning_level = ( p_main->i_warning_level < 0 ) ? 0 :
+ p_main->i_warning_level;
+ config_PutIntVariable( "warning", p_main->i_warning_level );
+
return( 0 );
}