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
c65c4ce7
Commit
c65c4ce7
authored
Jan 11, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_anlmdn: do not output more samples than received
parent
127564b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
af_anlmdn.c
libavfilter/af_anlmdn.c
+8
-6
No files found.
libavfilter/af_anlmdn.c
View file @
c65c4ce7
...
...
@@ -270,6 +270,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if
(
out
)
{
out
->
pts
=
s
->
pts
;
out
->
nb_samples
=
s
->
offset
;
if
(
s
->
eof_left
>=
0
)
{
out
->
nb_samples
=
FFMIN
(
s
->
eof_left
,
s
->
offset
);
s
->
eof_left
-=
out
->
nb_samples
;
}
s
->
pts
+=
s
->
offset
;
return
ff_filter_frame
(
outlink
,
out
);
...
...
@@ -290,15 +294,13 @@ static int request_frame(AVFilterLink *outlink)
AVFrame
*
in
;
if
(
s
->
eof_left
<
0
)
s
->
eof_left
=
av_audio_fifo_size
(
s
->
fifo
);
in
=
ff_get_audio_buffer
(
outlink
,
FFMIN
(
s
->
H
,
s
->
N
-
s
->
eof_left
));
s
->
eof_left
=
av_audio_fifo_size
(
s
->
fifo
)
-
(
s
->
S
+
s
->
K
);
if
(
s
->
eof_left
<
0
)
return
AVERROR_EOF
;
in
=
ff_get_audio_buffer
(
outlink
,
s
->
H
);
if
(
!
in
)
return
AVERROR
(
ENOMEM
);
if
(
s
->
eof_left
<
s
->
H
)
s
->
eof_left
=
0
;
else
s
->
eof_left
-=
s
->
H
;
return
filter_frame
(
ctx
->
inputs
[
0
],
in
);
}
...
...
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