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
ad0fe2f4
Commit
ad0fe2f4
authored
May 26, 2014
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
af_resample: Use avresample_get_out_samples
parent
b2d45654
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
af_resample.c
libavfilter/af_resample.c
+2
-7
No files found.
libavfilter/af_resample.c
View file @
ad0fe2f4
...
...
@@ -180,10 +180,7 @@ static int request_frame(AVFilterLink *outlink)
/* flush the lavr delay buffer */
if
(
ret
==
AVERROR_EOF
&&
s
->
avr
)
{
AVFrame
*
frame
;
int
nb_samples
=
av_rescale_rnd
(
avresample_get_delay
(
s
->
avr
),
outlink
->
sample_rate
,
ctx
->
inputs
[
0
]
->
sample_rate
,
AV_ROUND_UP
);
int
nb_samples
=
avresample_get_out_samples
(
s
->
avr
,
0
);
if
(
!
nb_samples
)
return
ret
;
...
...
@@ -219,9 +216,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
/* maximum possible samples lavr can output */
delay
=
avresample_get_delay
(
s
->
avr
);
nb_samples
=
av_rescale_rnd
(
in
->
nb_samples
+
delay
,
outlink
->
sample_rate
,
inlink
->
sample_rate
,
AV_ROUND_UP
);
nb_samples
=
avresample_get_out_samples
(
s
->
avr
,
in
->
nb_samples
);
out
=
ff_get_audio_buffer
(
outlink
,
nb_samples
);
if
(
!
out
)
{
...
...
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