avfilter/vf_elbg: stop leaking frame on error

This commit is contained in:
Paul B Mahol 2019-10-02 10:54:45 +02:00
parent c4de49edc4
commit 9847380f5f

View File

@ -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];