avfilter/af_rubberband: check if rbs is valid

This commit is contained in:
Paul B Mahol 2019-04-29 13:47:46 +02:00
parent 21d1bb00c4
commit a89ec33fd5
1 changed files with 2 additions and 0 deletions

View File

@ -157,6 +157,8 @@ static int config_input(AVFilterLink *inlink)
if (s->rbs)
rubberband_delete(s->rbs);
s->rbs = rubberband_new(inlink->sample_rate, inlink->channels, opts, 1. / s->tempo, s->pitch);
if (!s->rbs)
return AVERROR(ENOMEM);
inlink->partial_buf_size =
inlink->min_samples =