diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c index ed3a383709..14c3216b3a 100644 --- a/libavfilter/vf_libvmaf.c +++ b/libavfilter/vf_libvmaf.c @@ -235,6 +235,9 @@ static av_cold int init(AVFilterContext *ctx) s->gref = av_frame_alloc(); s->gmain = av_frame_alloc(); + if (!s->gref || !s->gmain) + return AVERROR(ENOMEM); + s->error = 0; s->vmaf_thread_created = 0;