diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2019-11-20 23:24:22 +0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-11-28 18:44:01 +0100 |
commit | 8aa143eaa89cff7a72e2e9c80eb7fbac3b77e5be (patch) | |
tree | df4fba8e80169b2e7fbb27e86bcd49d460d2646a | |
parent | df912bbc5f9cffa56341382a92aff739755f6d60 (diff) | |
download | ffmpeg-8aa143eaa89cff7a72e2e9c80eb7fbac3b77e5be.tar.gz |
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>
-rw-r--r-- | libavfilter/vf_libvmaf.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |