ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Thu Nov 8 21:34:49 2018 +0100| [698e67bef2ee76f317193e27f354c129b241332c] | committer: Paul B Mahol
avfilter/af_afir: do not leak frame and clear pointer to freed frame > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=698e67bef2ee76f317193e27f354c129b241332c --- libavfilter/af_afir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c index 6692dc768d..624eab093f 100644 --- a/libavfilter/af_afir.c +++ b/libavfilter/af_afir.c @@ -126,8 +126,10 @@ static int fir_frame(AudioFIRContext *s, AVFrame *in, AVFilterLink *outlink) if (!s->want_skip) { out = ff_get_audio_buffer(outlink, s->nb_samples); - if (!out) + if (!out) { + av_frame_free(&in); return AVERROR(ENOMEM); + } } if (s->pts == AV_NOPTS_VALUE) @@ -148,6 +150,7 @@ static int fir_frame(AudioFIRContext *s, AVFrame *in, AVFilterLink *outlink) s->index = 0; av_frame_free(&in); + s->in[0] = NULL; if (s->want_skip == 1) { s->want_skip = 0; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog