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
797d3efe
Commit
797d3efe
authored
Sep 17, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: use var_GetString(bool) when applicable.
parent
691b879e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
17 deletions
+15
-17
src/audio_output/aout_internal.h
src/audio_output/aout_internal.h
+14
-14
src/audio_output/common.c
src/audio_output/common.c
+1
-3
No files found.
src/audio_output/aout_internal.h
View file @
797d3efe
...
...
@@ -219,39 +219,39 @@ static inline bool AoutChangeFilterString( vlc_object_t *p_obj, aout_instance_t
const
char
*
psz_variable
,
const
char
*
psz_name
,
bool
b_add
)
{
vlc_value_t
val
;
char
*
psz_
val
;
char
*
psz_parser
;
if
(
*
psz_name
==
'\0'
)
return
false
;
if
(
p_aout
)
var_Get
(
p_aout
,
psz_variable
,
&
val
);
psz_val
=
var_GetString
(
p_aout
,
psz_variable
);
else
val
.
psz_string
=
config_GetPsz
(
p_obj
,
"audio-filter"
);
psz_val
=
config_GetPsz
(
p_obj
,
"audio-filter"
);
if
(
!
val
.
psz_string
)
val
.
psz_string
=
strdup
(
""
);
if
(
!
psz_val
)
psz_val
=
strdup
(
""
);
psz_parser
=
strstr
(
val
.
psz_string
,
psz_name
);
psz_parser
=
strstr
(
psz_val
,
psz_name
);
if
(
(
b_add
&&
psz_parser
)
||
(
!
b_add
&&
!
psz_parser
)
)
{
/* Nothing to do */
free
(
val
.
psz_string
);
free
(
psz_val
);
return
false
;
}
if
(
b_add
)
{
char
*
psz_old
=
val
.
psz_string
;
char
*
psz_old
=
psz_val
;
if
(
*
psz_old
)
{
if
(
asprintf
(
&
val
.
psz_string
,
"%s:%s"
,
psz_old
,
psz_name
)
==
-
1
)
val
.
psz_string
=
NULL
;
if
(
asprintf
(
&
psz_val
,
"%s:%s"
,
psz_old
,
psz_name
)
==
-
1
)
psz_val
=
NULL
;
}
else
val
.
psz_string
=
strdup
(
psz_name
);
psz_val
=
strdup
(
psz_name
);
free
(
psz_old
);
}
else
...
...
@@ -267,10 +267,10 @@ static inline bool AoutChangeFilterString( vlc_object_t *p_obj, aout_instance_t
}
if
(
p_aout
)
var_Set
(
p_aout
,
psz_variable
,
val
);
var_Set
String
(
p_aout
,
psz_variable
,
psz_
val
);
else
config_PutPsz
(
p_obj
,
psz_variable
,
val
.
psz_string
);
free
(
val
.
psz_string
);
config_PutPsz
(
p_obj
,
psz_variable
,
psz_val
);
free
(
psz_val
);
return
true
;
}
...
...
src/audio_output/common.c
View file @
797d3efe
...
...
@@ -77,7 +77,6 @@ static void aout_Destructor( vlc_object_t * p_this );
aout_instance_t
*
__aout_New
(
vlc_object_t
*
p_parent
)
{
aout_instance_t
*
p_aout
;
vlc_value_t
val
;
/* Allocate descriptor. */
p_aout
=
vlc_object_create
(
p_parent
,
VLC_OBJECT_AOUT
);
...
...
@@ -97,8 +96,7 @@ aout_instance_t * __aout_New( vlc_object_t * p_parent )
p_aout
->
output
.
b_starving
=
1
;
var_Create
(
p_aout
,
"intf-change"
,
VLC_VAR_BOOL
);
val
.
b_bool
=
true
;
var_Set
(
p_aout
,
"intf-change"
,
val
);
var_SetBool
(
p_aout
,
"intf-change"
,
true
);
vlc_object_set_destructor
(
p_aout
,
aout_Destructor
);
...
...
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