From 921c2ce0337baba79f8569070966254cf760c320 Mon Sep 17 00:00:00 2001 From: nick black Date: Tue, 22 Jun 2021 00:50:39 -0400 Subject: [PATCH] ffmpeg_resize: check for NULL from ffmpeg_resize_internal #1788 --- src/media/ffmpeg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/media/ffmpeg.c b/src/media/ffmpeg.c index 8536dcb5d..4a9da5ccf 100644 --- a/src/media/ffmpeg.c +++ b/src/media/ffmpeg.c @@ -513,6 +513,9 @@ int ffmpeg_resize(ncvisual* n, int rows, int cols){ if(data == n->data){ // no change, return return 0; } + if(data == NULL){ + return -1; + } AVFrame* sframe = av_frame_alloc(); if(sframe == NULL){ //fprintf(stderr, "Couldn't allocate output frame for scaled frame\n");