avfilter/vf_libvmaf: Check for av_frame_alloc failure

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Limin Wang 2019-11-20 23:24:22 +08:00 committed by Michael Niedermayer
parent df912bbc5f
commit 8aa143eaa8

View File

@ -235,6 +235,9 @@ static av_cold int init(AVFilterContext *ctx)
s->gref = av_frame_alloc(); s->gref = av_frame_alloc();
s->gmain = av_frame_alloc(); s->gmain = av_frame_alloc();
if (!s->gref || !s->gmain)
return AVERROR(ENOMEM);
s->error = 0; s->error = 0;
s->vmaf_thread_created = 0; s->vmaf_thread_created = 0;