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
5941179e
Commit
5941179e
authored
Mar 16, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_surround: drain input at EOF
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
1296a718
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
af_surround.c
libavfilter/af_surround.c
+25
-3
No files found.
libavfilter/af_surround.c
View file @
5941179e
...
...
@@ -1390,6 +1390,27 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
return
0
;
}
static
int
request_frame
(
AVFilterLink
*
outlink
)
{
AVFilterContext
*
ctx
=
outlink
->
src
;
AudioSurroundContext
*
s
=
ctx
->
priv
;
int
ret
=
0
;
ret
=
ff_request_frame
(
ctx
->
inputs
[
0
]);
if
(
ret
==
AVERROR_EOF
&&
av_audio_fifo_size
(
s
->
fifo
)
>
0
&&
av_audio_fifo_size
(
s
->
fifo
)
<
s
->
buf_size
)
{
AVFrame
*
in
;
in
=
ff_get_audio_buffer
(
outlink
,
s
->
buf_size
-
av_audio_fifo_size
(
s
->
fifo
));
if
(
!
in
)
return
AVERROR
(
ENOMEM
);
ret
=
filter_frame
(
ctx
->
inputs
[
0
],
in
);
av_audio_fifo_drain
(
s
->
fifo
,
s
->
buf_size
);
}
return
ret
;
}
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
{
AudioSurroundContext
*
s
=
ctx
->
priv
;
...
...
@@ -1445,9 +1466,10 @@ static const AVFilterPad inputs[] = {
static
const
AVFilterPad
outputs
[]
=
{
{
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_AUDIO
,
.
config_props
=
config_output
,
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_AUDIO
,
.
request_frame
=
request_frame
,
.
config_props
=
config_output
,
},
{
NULL
}
};
...
...
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