Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
7e1d4740
Commit
7e1d4740
authored
Feb 08, 2023
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_compand: simplify frame allocation
parent
068ad049
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
20 deletions
+2
-20
af_compand.c
libavfilter/af_compand.c
+2
-20
No files found.
libavfilter/af_compand.c
View file @
7e1d4740
...
@@ -306,8 +306,6 @@ static int config_output(AVFilterLink *outlink)
...
@@ -306,8 +306,6 @@ static int config_output(AVFilterLink *outlink)
int
nb_attacks
,
nb_decays
,
nb_points
;
int
nb_attacks
,
nb_decays
,
nb_points
;
int
new_nb_items
,
num
;
int
new_nb_items
,
num
;
int
i
;
int
i
;
int
err
;
count_items
(
s
->
attacks
,
&
nb_attacks
);
count_items
(
s
->
attacks
,
&
nb_attacks
);
count_items
(
s
->
decays
,
&
nb_decays
);
count_items
(
s
->
decays
,
&
nb_decays
);
...
@@ -495,25 +493,9 @@ static int config_output(AVFilterLink *outlink)
...
@@ -495,25 +493,9 @@ static int config_output(AVFilterLink *outlink)
return
0
;
return
0
;
}
}
s
->
delay_frame
=
av_frame_alloc
();
s
->
delay_frame
=
ff_get_audio_buffer
(
outlink
,
s
->
delay_samples
);
if
(
!
s
->
delay_frame
)
{
if
(
!
s
->
delay_frame
)
uninit
(
ctx
);
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
}
s
->
delay_frame
->
format
=
outlink
->
format
;
s
->
delay_frame
->
nb_samples
=
s
->
delay_samples
;
#if FF_API_OLD_CHANNEL_LAYOUT
FF_DISABLE_DEPRECATION_WARNINGS
s
->
delay_frame
->
channel_layout
=
outlink
->
channel_layout
;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
if
((
err
=
av_channel_layout_copy
(
&
s
->
delay_frame
->
ch_layout
,
&
outlink
->
ch_layout
))
<
0
)
return
err
;
err
=
av_frame_get_buffer
(
s
->
delay_frame
,
0
);
if
(
err
)
return
err
;
s
->
compand
=
compand_delay
;
s
->
compand
=
compand_delay
;
return
0
;
return
0
;
...
...
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