[FFmpeg-devel] [PATCH 7/7] avcodec/exr: Return correct error code on allocation failure

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Mon Apr 19 05:06:14 EEST 2021


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/exr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 }
-- 
2.27.0



More information about the ffmpeg-devel mailing list