mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avfilter/avfilter: fix OOM case for default activate
Fixes OOM when caller keeps adding frames into filtergraph that reached EOF by other means, for example EOF is signalled by other filter in filtergraph or by buffersink.
This commit is contained in:
parent
e3e3531d1e
commit
d9e41ead82
1 changed files with 10 additions and 0 deletions
|
|
@ -1167,6 +1167,16 @@ static int ff_filter_activate_default(AVFilterContext *filter)
|
|||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < filter->nb_outputs; i++) {
|
||||
int ret = filter->outputs[i]->status_in;
|
||||
|
||||
if (ret) {
|
||||
for (int j = 0; j < filter->nb_inputs; j++)
|
||||
ff_inlink_set_status(filter->inputs[j], ret);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < filter->nb_inputs; i++) {
|
||||
if (samples_ready(filter->inputs[i], filter->inputs[i]->min_samples)) {
|
||||
return ff_filter_frame_to_filter(filter->inputs[i]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue