summaryrefslogtreecommitdiff
path: root/libavfilter/vf_elbg.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/vf_elbg.c')
-rw-r--r--libavfilter/vf_elbg.c4
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];