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
0370c3e3
Commit
0370c3e3
authored
Nov 07, 2021
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_adelay: use outlink where applicable
parent
cd03a180
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
af_adelay.c
libavfilter/af_adelay.c
+5
-4
No files found.
libavfilter/af_adelay.c
View file @
0370c3e3
...
...
@@ -189,14 +189,15 @@ static int config_input(AVFilterLink *inlink)
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFrame
*
frame
)
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
AVFilterLink
*
outlink
=
ctx
->
outputs
[
0
];
AudioDelayContext
*
s
=
ctx
->
priv
;
AVFrame
*
out_frame
;
int
i
;
if
(
ctx
->
is_disabled
||
!
s
->
delays
)
return
ff_filter_frame
(
ctx
->
outputs
[
0
]
,
frame
);
return
ff_filter_frame
(
outlink
,
frame
);
out_frame
=
ff_get_audio_buffer
(
ctx
->
outputs
[
0
]
,
frame
->
nb_samples
);
out_frame
=
ff_get_audio_buffer
(
outlink
,
frame
->
nb_samples
);
if
(
!
out_frame
)
{
av_frame_free
(
&
frame
);
return
AVERROR
(
ENOMEM
);
...
...
@@ -215,9 +216,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
}
out_frame
->
pts
=
s
->
next_pts
;
s
->
next_pts
+=
av_rescale_q
(
frame
->
nb_samples
,
(
AVRational
){
1
,
inlink
->
sample_rate
},
in
link
->
time_base
);
s
->
next_pts
+=
av_rescale_q
(
frame
->
nb_samples
,
(
AVRational
){
1
,
outlink
->
sample_rate
},
out
link
->
time_base
);
av_frame_free
(
&
frame
);
return
ff_filter_frame
(
ctx
->
outputs
[
0
]
,
out_frame
);
return
ff_filter_frame
(
outlink
,
out_frame
);
}
static
int
activate
(
AVFilterContext
*
ctx
)
...
...
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