Commit 869d2111 authored by Sam Hocevar's avatar Sam Hocevar

* ./src/misc/modules.c: if a module has a zero-scored capability, we don't

    try to use it, unless it was explicitely requested (--vout for example).
parent fbf46423
......@@ -76,8 +76,9 @@ MODULE_CONFIG_STOP
MODULE_INIT_START
SET_DESCRIPTION( _("satellite input module") )
ADD_CAPABILITY( ACCESS, 50 )
ADD_CAPABILITY( ACCESS, 0 )
ADD_SHORTCUT( "satellite" )
ADD_SHORTCUT( "sat" )
MODULE_INIT_STOP
MODULE_ACTIVATE_START
......
......@@ -2,7 +2,7 @@
* modules.c : Built-in and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules.c,v 1.58 2002/04/11 08:55:49 sam Exp $
* $Id: modules.c,v 1.59 2002/05/14 19:47:25 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
......@@ -312,24 +312,29 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data )
continue;
}
/* Test if this plugin exports the required shortcut */
/* If we required a shortcut, check this plugin provides it. */
if( psz_name != NULL && *psz_name )
{
boolean_t b_ok = 0;
boolean_t b_trash = 1;
int i_dummy;
for( i_dummy = 0;
!b_ok && p_module->pp_shortcuts[i_dummy];
b_trash && p_module->pp_shortcuts[i_dummy];
i_dummy++ )
{
b_ok = !strcmp( psz_name, p_module->pp_shortcuts[i_dummy] );
b_trash = strcmp( psz_name, p_module->pp_shortcuts[i_dummy] );
}
if( !b_ok )
if( b_trash )
{
continue;
}
}
/* If we didn't require a shortcut, trash zero-scored plugins */
else if( !p_module->pi_score[i_capability] )
{
continue;
}
/* Special case: test if we requested a particular intf plugin */
if( i_capability == MODULE_CAPABILITY_INTF )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment