diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-10-02 10:54:45 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-10-02 10:54:45 +0200 |
commit | 9847380f5f5a3850ecc9f32fa310a7e5e3f703f7 (patch) | |
tree | 149b975688807f7b846c81fe79777501670776e2 /libavfilter/vf_elbg.c | |
parent | c4de49edc4652e2f17c8747a6dd9b36ff362017a (diff) |
avfilter/vf_elbg: stop leaking frame on error
Diffstat (limited to 'libavfilter/vf_elbg.c')
-rw-r--r-- | libavfilter/vf_elbg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_elbg.c b/libavfilter/vf_elbg.c index 396af82f77..b59da9ec85 100644 --- a/libavfilter/vf_elbg.c +++ b/libavfilter/vf_elbg.c @@ -178,8 +178,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) AVFrame *out = ff_get_video_buffer(outlink, outlink->w, outlink->h); uint32_t *pal; - if (!out) + if (!out) { + av_frame_free(&frame); return AVERROR(ENOMEM); + } out->pts = frame->pts; av_frame_free(&frame); pal = (uint32_t *)out->data[1]; |