From da6e137cb6e81e2389cf62dca2b1f957862a8498 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 19 Apr 2021 03:22:42 +0200 Subject: [PATCH] avcodec/exr: Return correct error code on allocation failure Reviewed-by: Michael Niedermayer Signed-off-by: Andreas Rheinhardt --- libavcodec/exr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 49c47741455..4f55609b0cc 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -2245,7 +2245,7 @@ static av_cold int decode_init(AVCodecContext *avctx) // allocate thread data, used for non EXR_RAW compression types s->thread_data = av_mallocz_array(avctx->thread_count, sizeof(EXRThreadData)); if (!s->thread_data) - return AVERROR_INVALIDDATA; + return AVERROR(ENOMEM); return 0; } -- 2.39.5