mirror of https://git.ffmpeg.org/ffmpeg.git
libavfilter/af_amerge: fix segfault if init fails.
This commit is contained in:
parent
066739f6bc
commit
bf0712c2f8
|
@ -63,8 +63,10 @@ static av_cold void uninit(AVFilterContext *ctx)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < am->nb_inputs; i++) {
|
for (i = 0; i < am->nb_inputs; i++) {
|
||||||
ff_bufqueue_discard_all(&am->in[i].queue);
|
if (am->in)
|
||||||
av_freep(&ctx->input_pads[i].name);
|
ff_bufqueue_discard_all(&am->in[i].queue);
|
||||||
|
if (ctx->input_pads)
|
||||||
|
av_freep(&ctx->input_pads[i].name);
|
||||||
}
|
}
|
||||||
av_freep(&am->in);
|
av_freep(&am->in);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue