1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/af_rubberband: handle case when no frame is given

This commit is contained in:
Paul B Mahol 2019-05-06 21:04:52 +02:00
parent fec4212d8e
commit 066864aca8

View File

@ -148,7 +148,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
av_frame_free(&in);
return ret;
return ret < 0 ? ret : nb_samples;
}
static int config_input(AVFilterLink *inlink)
@ -184,8 +184,11 @@ static int activate(AVFilterContext *ctx)
ret = ff_inlink_consume_samples(inlink, s->nb_samples, s->nb_samples, &in);
if (ret < 0)
return ret;
if (ret > 0)
return filter_frame(inlink, in);
if (ret > 0) {
ret = filter_frame(inlink, in);
if (ret > 0)
return ret;
}
FF_FILTER_FORWARD_STATUS(inlink, outlink);
FF_FILTER_FORWARD_WANTED(outlink, inlink);