mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avfilter/vf_elbg: stop leaking frame on error
This commit is contained in:
parent
c4de49edc4
commit
9847380f5f
@ -178,8 +178,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
|
|||||||
AVFrame *out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
|
AVFrame *out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
|
||||||
uint32_t *pal;
|
uint32_t *pal;
|
||||||
|
|
||||||
if (!out)
|
if (!out) {
|
||||||
|
av_frame_free(&frame);
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
}
|
||||||
out->pts = frame->pts;
|
out->pts = frame->pts;
|
||||||
av_frame_free(&frame);
|
av_frame_free(&frame);
|
||||||
pal = (uint32_t *)out->data[1];
|
pal = (uint32_t *)out->data[1];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user