Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/libopenjpegenc.c')
-rw-r--r--libavcodec/libopenjpegenc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index 66633f4ad2..458cf7c2c1 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -164,6 +164,9 @@ static opj_image_t *mj2_create_image(AVCodecContext *avctx, opj_cparameters_t *p
img = opj_image_create(numcomps, cmptparm, color_space);
+ if (!img)
+ return NULL;
+
// x0, y0 is the top left corner of the image
// x1, y1 is the width, height of the reference grid
img->x0 = 0;