Commit bf5bdbdb authored by Paul B Mahol's avatar Paul B Mahol

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

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