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
5864ae43
Commit
5864ae43
authored
Nov 06, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: simplify filterign special cases using pointer comparison
parent
1abc59b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/audio_output/filters.c
src/audio_output/filters.c
+6
-5
No files found.
src/audio_output/filters.c
View file @
5864ae43
...
...
@@ -404,7 +404,8 @@ int aout_FiltersNew (audio_output_t *aout,
var_AddCallback
(
aout
,
"visual"
,
VisualizationCallback
,
NULL
);
var_AddCallback
(
aout
,
"equalizer"
,
EqualizerCallback
,
NULL
);
bool
scaletempo
=
var_InheritBool
(
aout
,
"audio-time-stretch"
);
const
char
*
scaletempo
=
var_InheritBool
(
aout
,
"audio-time-stretch"
)
?
"scaletempo"
:
NULL
;
char
*
filters
=
var_InheritString
(
aout
,
"audio-filter"
);
char
*
visual
=
var_InheritString
(
aout
,
"audio-visual"
);
...
...
@@ -421,8 +422,8 @@ int aout_FiltersNew (audio_output_t *aout,
const
char
*
list
[
AOUT_MAX_FILTERS
];
unsigned
n
=
0
;
if
(
scaletempo
)
list
[
n
++
]
=
"scaletempo"
;
if
(
scaletempo
!=
NULL
)
list
[
n
++
]
=
scaletempo
;
if
(
filters
!=
NULL
)
{
char
*
p
=
filters
,
*
name
;
...
...
@@ -445,7 +446,7 @@ int aout_FiltersNew (audio_output_t *aout,
filter_t
*
filter
=
CreateFilter
(
VLC_OBJECT
(
aout
),
name
,
&
input_format
,
&
output_format
,
i
==
(
n
-
(
visual
!=
NULL
))
);
name
==
visual
);
if
(
filter
==
NULL
)
{
msg_Err
(
aout
,
"cannot add user filter %s (skipped)"
,
name
);
...
...
@@ -468,7 +469,7 @@ int aout_FiltersNew (audio_output_t *aout,
owner
->
filters
[
owner
->
nb_filters
++
]
=
filter
;
input_format
=
filter
->
fmt_out
.
audio
;
if
(
i
==
0
&&
scaletempo
)
/* scaletempo */
if
(
name
==
scaletempo
)
owner
->
rate_filter
=
filter
;
}
free
(
visual
);
...
...
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