Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
ab8cecd8
Commit
ab8cecd8
authored
Aug 16, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small code factorization
parent
77a64d9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
src/modules/modules.c
src/modules/modules.c
+13
-10
No files found.
src/modules/modules.c
View file @
ab8cecd8
...
...
@@ -84,6 +84,13 @@ static module_t *module_InitDynamic (vlc_object_t *, const char *, bool);
#endif
static
module_t
*
module_InitStatic
(
vlc_plugin_cb
);
static
void
module_StoreBank
(
module_t
*
module
)
{
/*vlc_assert_locked (&modules.lock);*/
module
->
next
=
modules
.
head
;
modules
.
head
=
module
;
}
/**
* Init bank
*
...
...
@@ -101,7 +108,10 @@ void module_InitBank (void)
* library just as another module, and for instance the configuration
* options of main will be available in the module bank structure just
* as for every other module. */
module_InitStatic
(
vlc_entry__main
);
module_t
*
module
=
module_InitStatic
(
vlc_entry__main
);
if
(
likely
(
module
!=
NULL
))
module_StoreBank
(
module
);
vlc_rwlock_init
(
&
config_lock
);
config_SortConfig
();
}
...
...
@@ -956,8 +966,7 @@ static int AllocatePluginFile( vlc_object_t * p_this, module_bank_t *p_bank,
break
;
}
p_module
->
next
=
modules
.
head
;
modules
.
head
=
p_module
;
module_StoreBank
(
p_module
);
if
(
mode
==
CACHE_IGNORE
)
return
0
;
...
...
@@ -1028,15 +1037,9 @@ static module_t *module_InitStatic (vlc_plugin_cb entry)
/* Initializes the module */
module_t
*
module
=
entry
();
if
(
unlikely
(
module
==
NULL
))
abort
();
/* FIXME: OOM or bug */
return
NULL
;
module
->
b_loaded
=
true
;
module
->
b_unloadable
=
false
;
/* LOCK */
module
->
next
=
modules
.
head
;
modules
.
head
=
module
;
/* UNLOCK */
return
module
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment