Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
27ba05ad
Commit
27ba05ad
authored
Feb 26, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_compand: merge uninit() calls on error from af_compand_fork.c
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8b804859
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
af_compand.c
libavfilter/af_compand.c
+12
-3
No files found.
libavfilter/af_compand.c
View file @
27ba05ad
...
...
@@ -324,16 +324,20 @@ static int config_output(AVFilterLink *outlink)
s
->
nb_segments
=
(
nb_points
+
4
)
*
2
;
s
->
segments
=
av_mallocz_array
(
s
->
nb_segments
,
sizeof
(
*
s
->
segments
));
if
(
!
s
->
channels
||
!
s
->
segments
)
if
(
!
s
->
channels
||
!
s
->
segments
)
{
uninit
(
ctx
);
return
AVERROR
(
ENOMEM
);
}
p
=
s
->
attacks
;
for
(
i
=
0
,
new_nb_items
=
0
;
i
<
nb_attacks
;
i
++
)
{
char
*
tstr
=
av_strtok
(
p
,
" |"
,
&
saveptr
);
p
=
NULL
;
new_nb_items
+=
sscanf
(
tstr
,
"%lf"
,
&
s
->
channels
[
i
].
attack
)
==
1
;
if
(
s
->
channels
[
i
].
attack
<
0
)
if
(
s
->
channels
[
i
].
attack
<
0
)
{
uninit
(
ctx
);
return
AVERROR
(
EINVAL
);
}
}
nb_attacks
=
new_nb_items
;
...
...
@@ -342,8 +346,10 @@ static int config_output(AVFilterLink *outlink)
char
*
tstr
=
av_strtok
(
p
,
" |"
,
&
saveptr
);
p
=
NULL
;
new_nb_items
+=
sscanf
(
tstr
,
"%lf"
,
&
s
->
channels
[
i
].
decay
)
==
1
;
if
(
s
->
channels
[
i
].
decay
<
0
)
if
(
s
->
channels
[
i
].
decay
<
0
)
{
uninit
(
ctx
);
return
AVERROR
(
EINVAL
);
}
}
nb_decays
=
new_nb_items
;
...
...
@@ -351,6 +357,7 @@ static int config_output(AVFilterLink *outlink)
av_log
(
ctx
,
AV_LOG_ERROR
,
"Number of attacks %d differs from number of decays %d.
\n
"
,
nb_attacks
,
nb_decays
);
uninit
(
ctx
);
return
AVERROR
(
EINVAL
);
}
...
...
@@ -362,11 +369,13 @@ static int config_output(AVFilterLink *outlink)
if
(
sscanf
(
tstr
,
"%lf/%lf"
,
&
S
(
i
).
x
,
&
S
(
i
).
y
)
!=
2
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Invalid and/or missing input/output value.
\n
"
);
uninit
(
ctx
);
return
AVERROR
(
EINVAL
);
}
if
(
i
&&
S
(
i
-
1
).
x
>
S
(
i
).
x
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Transfer function input values must be increasing.
\n
"
);
uninit
(
ctx
);
return
AVERROR
(
EINVAL
);
}
S
(
i
).
y
-=
S
(
i
).
x
;
...
...
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