[vlc-devel] commit: Fix module_need parsing. a, b, c, d should first try loading a, then b , then c, then d. (Antoine Cellerier )
git version control
git at videolan.org
Wed Dec 30 15:39:34 CET 2009
vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Wed Dec 30 15:39:14 2009 +0100| [40a2f546e1dca36312916b391f64f96a438f0a37] | committer: Antoine Cellerier
Fix module_need parsing. a,b,c,d should first try loading a, then b, then c, then d.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=40a2f546e1dca36312916b391f64f96a438f0a37
---
src/modules/modules.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/modules/modules.c b/src/modules/modules.c
index 2cfb8f5..52662a2 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -475,7 +475,7 @@ module_t * __module_need( vlc_object_t *p_this, const char *psz_capability,
count = 0;
for (size_t i = 0; (p_module = p_all[i]) != NULL; i++)
{
- bool b_shortcut_bonus = false;
+ int i_shortcut_bonus = 0;
/* Test that this module can do what we need */
if( !module_provides( p_module, psz_capability ) )
@@ -502,7 +502,7 @@ module_t * __module_need( vlc_object_t *p_this, const char *psz_capability,
/* Found it */
if( c && c[1] )
psz_alias = c+1;
- b_shortcut_bonus = true;
+ i_shortcut_bonus = i_short * 10000;
goto found_shortcut;
}
}
@@ -525,10 +525,8 @@ module_t * __module_need( vlc_object_t *p_this, const char *psz_capability,
found_shortcut:
/* Store this new module */
p_list[count].p_module = module_hold (p_module);
- p_list[count].i_score = p_module->i_score;
- if( b_shortcut_bonus )
- p_list[count].i_score += 10000;
- p_list[count].b_force = b_shortcut_bonus && b_strict;
+ p_list[count].i_score = p_module->i_score + i_shortcut_bonus;
+ p_list[count].b_force = i_shortcut_bonus && b_strict;
count++;
}
More information about the vlc-devel
mailing list