Browse Source

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

tags/n4.1
Paul B Mahol 7 years ago
parent
commit
bf5bdbdb92
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      libavfilter/af_adelay.c

+ 4
- 3
libavfilter/af_adelay.c 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);
}



Loading…
Cancel
Save