Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-11-08 23:34:49 +0300
committerPaul B Mahol <onemda@gmail.com>2018-11-08 23:34:49 +0300
commit698e67bef2ee76f317193e27f354c129b241332c (patch)
treeb0f5d7d06423e81cd11c2b8b57597bb4f4181e2d /libavfilter/af_afir.c
parent70463b702697ef8be4ec4d88969b4fce5b4e7a7e (diff)
avfilter/af_afir: do not leak frame and clear pointer to freed frame
Diffstat (limited to 'libavfilter/af_afir.c')
-rw-r--r--libavfilter/af_afir.c5
1 files changed, 4 insertions, 1 deletions
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;