Commit 8156b5ac authored by Nicolas George's avatar Nicolas George Committed by Marton Balint

avfilter/af_amerge: detect EOF immediately

Fix an infinite loop in forward_status_change().
Signed-off-by: 's avatarNicolas George <george@nsup.org>
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 8dcb28cf
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment