Commit 5c7c0c5b authored by Paul B Mahol's avatar Paul B Mahol

avfilter/af_afftfilt: add missing error check

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 40730460
......@@ -197,8 +197,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
int ch, n, ret, i, j, k;
int start = s->start, end = s->end;
av_audio_fifo_write(s->fifo, (void **)frame->extended_data, frame->nb_samples);
ret = av_audio_fifo_write(s->fifo, (void **)frame->extended_data, frame->nb_samples);
av_frame_free(&frame);
if (ret < 0)
return ret;
while (av_audio_fifo_size(s->fifo) >= window_size) {
if (!in) {
......@@ -316,7 +318,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
}
av_frame_free(&in);
return ret;
return ret < 0 ? ret : 0;
}
static int query_formats(AVFilterContext *ctx)
......
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