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
835f25c5
Commit
835f25c5
authored
Nov 06, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compressor: setup filter_t only when successful
parent
b2d4229e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
18 deletions
+3
-18
modules/audio_filter/compressor.c
modules/audio_filter/compressor.c
+3
-18
No files found.
modules/audio_filter/compressor.c
View file @
835f25c5
...
...
@@ -209,27 +209,10 @@ static int Open( vlc_object_t *p_this )
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
vlc_object_t
*
p_aout
=
p_filter
->
p_parent
;
float
f_sample_rate
=
p_filter
->
fmt_in
.
audio
.
i_rate
;
filter_sys_t
*
p_sys
;
float
f_num
;
if
(
p_filter
->
fmt_in
.
audio
.
i_format
!=
VLC_CODEC_FL32
||
p_filter
->
fmt_out
.
audio
.
i_format
!=
VLC_CODEC_FL32
)
{
p_filter
->
fmt_in
.
audio
.
i_format
=
VLC_CODEC_FL32
;
p_filter
->
fmt_out
.
audio
.
i_format
=
VLC_CODEC_FL32
;
msg_Warn
(
p_filter
,
"bad input or output format"
);
return
VLC_EGENERIC
;
}
if
(
!
AOUT_FMTS_SIMILAR
(
&
p_filter
->
fmt_in
.
audio
,
&
p_filter
->
fmt_out
.
audio
)
)
{
p_filter
->
fmt_out
.
audio
=
p_filter
->
fmt_in
.
audio
;
msg_Warn
(
p_filter
,
"input and output formats are not similar"
);
return
VLC_EGENERIC
;
}
/* Initialize the filter parameter structure */
p_sys
=
p_filter
->
p_sys
=
calloc
(
1
,
sizeof
(
*
p_sys
)
);
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
=
calloc
(
1
,
sizeof
(
*
p_sys
)
);
if
(
!
p_sys
)
{
return
VLC_ENOMEM
;
...
...
@@ -273,6 +256,8 @@ static int Open( vlc_object_t *p_this )
var_AddCallback
(
p_aout
,
"compressor-makeup-gain"
,
MakeupGainCallback
,
p_sys
);
/* Set the filter function */
p_filter
->
fmt_in
.
audio
.
i_format
=
VLC_CODEC_FL32
;
p_filter
->
fmt_out
.
audio
=
p_filter
->
fmt_in
.
audio
;
p_filter
->
pf_audio_filter
=
DoWork
;
/* At this stage, we are ready! */
...
...
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