mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
avfilter/af_adelay: do not crash if allocation of chandelay failed
This commit is contained in:
parent
444cdb422d
commit
bf5bdbdb92
1 changed files with 4 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue