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
30bf54b9
Commit
30bf54b9
authored
Dec 28, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_afir: introduce uninit_segment() and use it
parent
8007e8fc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
18 deletions
+23
-18
af_afir.c
libavfilter/af_afir.c
+23
-18
No files found.
libavfilter/af_afir.c
View file @
30bf54b9
...
@@ -593,39 +593,44 @@ static int config_output(AVFilterLink *outlink)
...
@@ -593,39 +593,44 @@ static int config_output(AVFilterLink *outlink)
return
0
;
return
0
;
}
}
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
static
void
uninit_segment
(
AVFilterContext
*
ctx
,
AudioFIRSegment
*
seg
)
{
{
AudioFIRContext
*
s
=
ctx
->
priv
;
AudioFIRContext
*
s
=
ctx
->
priv
;
int
ch
;
if
(
s
->
seg
.
coeff
)
{
if
(
s
eg
->
coeff
)
{
for
(
ch
=
0
;
ch
<
s
->
nb_coef_channels
;
ch
++
)
{
for
(
int
ch
=
0
;
ch
<
s
->
nb_coef_channels
;
ch
++
)
{
av_freep
(
&
s
->
seg
.
coeff
[
ch
]);
av_freep
(
&
s
eg
->
coeff
[
ch
]);
}
}
}
}
av_freep
(
&
s
->
seg
.
coeff
);
av_freep
(
&
s
eg
->
coeff
);
if
(
s
->
seg
.
rdft
)
{
if
(
s
eg
->
rdft
)
{
for
(
ch
=
0
;
ch
<
s
->
nb_channels
;
ch
++
)
{
for
(
int
ch
=
0
;
ch
<
s
->
nb_channels
;
ch
++
)
{
av_rdft_end
(
s
->
seg
.
rdft
[
ch
]);
av_rdft_end
(
s
eg
->
rdft
[
ch
]);
}
}
}
}
av_freep
(
&
s
->
seg
.
rdft
);
av_freep
(
&
s
eg
->
rdft
);
if
(
s
->
seg
.
irdft
)
{
if
(
s
eg
->
irdft
)
{
for
(
ch
=
0
;
ch
<
s
->
nb_channels
;
ch
++
)
{
for
(
int
ch
=
0
;
ch
<
s
->
nb_channels
;
ch
++
)
{
av_rdft_end
(
s
->
seg
.
irdft
[
ch
]);
av_rdft_end
(
s
eg
->
irdft
[
ch
]);
}
}
}
}
av_freep
(
&
s
->
seg
.
irdft
);
av_freep
(
&
s
eg
->
irdft
);
av_frame_free
(
&
s
->
in
[
1
]);
av_frame_free
(
&
seg
->
block
);
av_frame_free
(
&
seg
->
sum
);
av_frame_free
(
&
seg
->
buffer
);
}
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
{
AudioFIRContext
*
s
=
ctx
->
priv
;
av_frame_free
(
&
s
->
seg
.
block
);
uninit_segment
(
ctx
,
&
s
->
seg
);
av_frame_free
(
&
s
->
seg
.
sum
);
av_frame_free
(
&
s
->
seg
.
buffer
);
av_freep
(
&
s
->
fdsp
);
av_freep
(
&
s
->
fdsp
);
av_frame_free
(
&
s
->
in
[
1
]);
for
(
int
i
=
0
;
i
<
ctx
->
nb_outputs
;
i
++
)
for
(
int
i
=
0
;
i
<
ctx
->
nb_outputs
;
i
++
)
av_freep
(
&
ctx
->
output_pads
[
i
].
name
);
av_freep
(
&
ctx
->
output_pads
[
i
].
name
);
...
...
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