diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-10-18 10:21:09 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-10-18 10:24:16 +0200 |
commit | bf5bdbdb926742235e2037389115e9308223e153 (patch) | |
tree | 771271cf5bbaed6f32464fad9226fe489deef431 /libavfilter/af_adelay.c | |
parent | 444cdb422d3ccc8f4946c0505c60e04cf652ef9a (diff) | |
download | ffmpeg-streaming-bf5bdbdb926742235e2037389115e9308223e153.zip ffmpeg-streaming-bf5bdbdb926742235e2037389115e9308223e153.tar.gz |
avfilter/af_adelay: do not crash if allocation of chandelay failed
Diffstat (limited to 'libavfilter/af_adelay.c')
-rw-r--r-- | libavfilter/af_adelay.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavfilter/af_adelay.c b/libavfilter/af_adelay.c index d6d81ba..46c3d51 100644 --- a/libavfilter/af_adelay.c +++ b/libavfilter/af_adelay.c @@ -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); } |