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
478a1949
Commit
478a1949
authored
Jun 18, 2017
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_amix: fix possible hang
Fixes #6424. Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
f434ddf4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
af_amix.c
libavfilter/af_amix.c
+5
-5
No files found.
libavfilter/af_amix.c
View file @
478a1949
...
...
@@ -268,7 +268,7 @@ static int calc_active_inputs(MixContext *s);
/**
* Read samples from the input FIFOs, mix, and write to the output link.
*/
static
int
output_frame
(
AVFilterLink
*
outlink
)
static
int
output_frame
(
AVFilterLink
*
outlink
,
int
need_request
)
{
AVFilterContext
*
ctx
=
outlink
->
src
;
MixContext
*
s
=
ctx
->
priv
;
...
...
@@ -288,7 +288,7 @@ static int output_frame(AVFilterLink *outlink)
if
(
ns
<
nb_samples
)
{
if
(
!
(
s
->
input_state
[
i
]
&
INPUT_EOF
))
/* unclosed input with not enough samples */
return
0
;
return
need_request
?
ff_request_frame
(
ctx
->
inputs
[
i
])
:
0
;
/* closed input to drain */
nb_samples
=
ns
;
}
...
...
@@ -387,7 +387,7 @@ static int request_samples(AVFilterContext *ctx, int min_samples)
}
else
if
(
ret
<
0
)
return
ret
;
}
return
output_frame
(
ctx
->
outputs
[
0
]);
return
output_frame
(
ctx
->
outputs
[
0
]
,
1
);
}
/**
...
...
@@ -431,7 +431,7 @@ static int request_frame(AVFilterLink *outlink)
s
->
input_state
[
0
]
=
0
;
if
(
s
->
nb_inputs
==
1
)
return
AVERROR_EOF
;
return
output_frame
(
ctx
->
outputs
[
0
]);
return
output_frame
(
ctx
->
outputs
[
0
]
,
1
);
}
return
ret
;
}
...
...
@@ -470,7 +470,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
buf
->
nb_samples
);
av_frame_free
(
&
buf
);
return
output_frame
(
outlink
);
return
output_frame
(
outlink
,
0
);
fail:
av_frame_free
(
&
buf
);
...
...
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