summaryrefslogtreecommitdiff
path: root/libavcodec/exr.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-19 03:22:42 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-24 14:03:29 +0200
commitda6e137cb6e81e2389cf62dca2b1f957862a8498 (patch)
treea636f534dad91768f86f53a3ec596091e64390cb /libavcodec/exr.c
parenta1ed984e049c90122e80bd60c2028f9bb22cc31c (diff)
avcodec/exr: Return correct error code on allocation failure
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/exr.c')
-rw-r--r--libavcodec/exr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 49c4774145..4f55609b0c 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;
}