]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/exr: Return correct error code on allocation failure
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Mon, 19 Apr 2021 01:22:42 +0000 (03:22 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Sat, 24 Apr 2021 12:03:29 +0000 (14:03 +0200)
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
libavcodec/exr.c

index 49c4774145522617233a4cc4ef04b06c0ea844b8..4f55609b0cc3a044d4983f2a27740e674a1d1ab4 100644 (file)
@@ -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;
 }