mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-15 19:55:08 +00:00
avfilter/af_amerge: detect EOF immediately
Fix an infinite loop in forward_status_change(). Signed-off-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
8dcb28cf6d
commit
8156b5ac94
@ -23,6 +23,9 @@
|
||||
* Audio merging filter
|
||||
*/
|
||||
|
||||
#define FF_INTERNAL_FIELDS 1
|
||||
#include "framequeue.h"
|
||||
|
||||
#include "libavutil/avstring.h"
|
||||
#include "libavutil/bprint.h"
|
||||
#include "libavutil/channel_layout.h"
|
||||
@ -182,7 +185,9 @@ static int request_frame(AVFilterLink *outlink)
|
||||
int i, ret;
|
||||
|
||||
for (i = 0; i < s->nb_inputs; i++)
|
||||
if (!s->in[i].nb_samples)
|
||||
if (!s->in[i].nb_samples ||
|
||||
/* detect EOF immediately */
|
||||
(ctx->inputs[i]->status_in && !ctx->inputs[i]->status_out))
|
||||
if ((ret = ff_request_frame(ctx->inputs[i])) < 0)
|
||||
return ret;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user