Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
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
Show 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);
...
@@ -84,6 +84,13 @@ static module_t *module_InitDynamic (vlc_object_t *, const char *, bool);
#endif
#endif
static
module_t
*
module_InitStatic
(
vlc_plugin_cb
);
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
* Init bank
*
*
...
@@ -101,7 +108,10 @@ void module_InitBank (void)
...
@@ -101,7 +108,10 @@ void module_InitBank (void)
* library just as another module, and for instance the configuration
* library just as another module, and for instance the configuration
* options of main will be available in the module bank structure just
* options of main will be available in the module bank structure just
* as for every other module. */
* 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
);
vlc_rwlock_init
(
&
config_lock
);
config_SortConfig
();
config_SortConfig
();
}
}
...
@@ -956,8 +966,7 @@ static int AllocatePluginFile( vlc_object_t * p_this, module_bank_t *p_bank,
...
@@ -956,8 +966,7 @@ static int AllocatePluginFile( vlc_object_t * p_this, module_bank_t *p_bank,
break
;
break
;
}
}
p_module
->
next
=
modules
.
head
;
module_StoreBank
(
p_module
);
modules
.
head
=
p_module
;
if
(
mode
==
CACHE_IGNORE
)
if
(
mode
==
CACHE_IGNORE
)
return
0
;
return
0
;
...
@@ -1028,15 +1037,9 @@ static module_t *module_InitStatic (vlc_plugin_cb entry)
...
@@ -1028,15 +1037,9 @@ static module_t *module_InitStatic (vlc_plugin_cb entry)
/* Initializes the module */
/* Initializes the module */
module_t
*
module
=
entry
();
module_t
*
module
=
entry
();
if
(
unlikely
(
module
==
NULL
))
if
(
unlikely
(
module
==
NULL
))
abort
();
/* FIXME: OOM or bug */
return
NULL
;
module
->
b_loaded
=
true
;
module
->
b_loaded
=
true
;
module
->
b_unloadable
=
false
;
module
->
b_unloadable
=
false
;
/* LOCK */
module
->
next
=
modules
.
head
;
modules
.
head
=
module
;
/* UNLOCK */
return
module
;
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