1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avfilter/af_adelay: do not crash if allocation of chandelay failed

This commit is contained in:
Paul B Mahol 2018-10-18 10:21:09 +02:00
parent 444cdb422d
commit bf5bdbdb92

View File

@ -249,10 +249,11 @@ static int request_frame(AVFilterLink *outlink)
static av_cold void uninit(AVFilterContext *ctx)
{
AudioDelayContext *s = ctx->priv;
int i;
for (i = 0; i < s->nb_delays; i++)
av_freep(&s->chandelay[i].samples);
if (s->chandelay) {
for (int i = 0; i < s->nb_delays; i++)
av_freep(&s->chandelay[i].samples);
}
av_freep(&s->chandelay);
}