Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
bca54820
Commit
bca54820
authored
Dec 29, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InheritValue: simplify and render thread-safe
parent
8b045d0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
27 deletions
+3
-27
src/misc/variables.c
src/misc/variables.c
+3
-27
No files found.
src/misc/variables.c
View file @
bca54820
...
...
@@ -1403,35 +1403,11 @@ static void CheckValue ( variable_t *p_var, vlc_value_t *p_val )
static
int
InheritValue
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
,
vlc_value_t
*
p_val
,
int
i_type
)
{
int
i_var
;
variable_t
*
p_var
;
if
(
p_this
->
p_parent
)
{
vlc_object_internals_t
*
p_priv
=
vlc_internals
(
p_this
->
p_parent
);
i_var
=
Lookup
(
p_priv
->
p_vars
,
p_priv
->
i_vars
,
psz_name
);
if
(
i_var
>=
0
)
{
/* We found it! */
p_var
=
&
p_priv
->
p_vars
[
i_var
];
/* Really get the variable */
*
p_val
=
p_var
->
val
;
/* Duplicate value if needed */
p_var
->
ops
->
pf_dup
(
p_val
);
/*msg_Dbg( p_this, "Inherited value for var %s from object %s",
psz_name ? psz_name : "(null)",
p_this->psz_object_name
? p_this->psz_object_name : "(Unknown)" );*/
for
(
vlc_object_t
*
obj
=
p_this
;
obj
!=
NULL
;
obj
=
obj
->
p_parent
)
if
(
var_GetChecked
(
p_this
,
psz_name
,
i_type
,
p_val
)
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
}
return
InheritValue
(
p_this
->
p_parent
,
psz_name
,
p_val
,
i_type
);
}
/* else take value from config */
/* else take value from config */
switch
(
i_type
&
VLC_VAR_CLASS
)
{
case
VLC_VAR_STRING
:
...
...
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