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
937cfebd
Commit
937cfebd
authored
Jul 12, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/aevalsrc: remove hard limit on number of channels
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
86d1a5d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
asrc_aevalsrc.c
libavfilter/asrc_aevalsrc.c
+10
-8
No files found.
libavfilter/asrc_aevalsrc.c
View file @
937cfebd
...
...
@@ -55,7 +55,7 @@ typedef struct {
char
*
chlayout_str
;
int
nb_channels
;
int64_t
pts
;
AVExpr
*
expr
[
8
]
;
AVExpr
*
*
expr
;
char
*
exprs
;
int
nb_samples
;
///< number of samples per requested frame
int64_t
duration
;
...
...
@@ -86,7 +86,7 @@ static int init(AVFilterContext *ctx)
EvalContext
*
eval
=
ctx
->
priv
;
char
*
args1
=
av_strdup
(
eval
->
exprs
);
char
*
expr
,
*
buf
;
int
ret
,
i
;
int
ret
;
if
(
!
args1
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Channels expressions list is empty
\n
"
);
...
...
@@ -96,15 +96,16 @@ static int init(AVFilterContext *ctx)
/* parse expressions */
buf
=
args1
;
i
=
0
;
while
(
i
<
FF_ARRAY_ELEMS
(
eval
->
expr
)
&&
(
expr
=
av_strtok
(
buf
,
"|"
,
&
buf
)))
{
ret
=
av_expr_parse
(
&
eval
->
expr
[
i
],
expr
,
var_names
,
while
(
expr
=
av_strtok
(
buf
,
"|"
,
&
buf
))
{
if
(
!
av_dynarray2_add
((
void
**
)
&
eval
->
expr
,
&
eval
->
nb_channels
,
sizeof
(
*
eval
->
expr
),
NULL
))
{
ret
=
AVERROR
(
ENOMEM
);
goto
end
;
}
ret
=
av_expr_parse
(
&
eval
->
expr
[
eval
->
nb_channels
-
1
],
expr
,
var_names
,
NULL
,
NULL
,
NULL
,
NULL
,
0
,
ctx
);
if
(
ret
<
0
)
goto
end
;
i
++
;
}
eval
->
nb_channels
=
i
;
if
(
eval
->
chlayout_str
)
{
int
n
;
...
...
@@ -146,10 +147,11 @@ static av_cold void uninit(AVFilterContext *ctx)
EvalContext
*
eval
=
ctx
->
priv
;
int
i
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
for
(
i
=
0
;
i
<
eval
->
nb_channels
;
i
++
)
{
av_expr_free
(
eval
->
expr
[
i
]);
eval
->
expr
[
i
]
=
NULL
;
}
av_freep
(
&
eval
->
expr
);
}
static
int
config_props
(
AVFilterLink
*
outlink
)
...
...
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