diff mbox series

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

Message ID HE1PR0301MB2154BA3CFF2CF1A5D481E5CD8F499@HE1PR0301MB2154.eurprd03.prod.outlook.com
State Accepted
Commit da6e137cb6e81e2389cf62dca2b1f957862a8498
Headers show
Series [FFmpeg-devel,1/7] avcodec/avcodec: Actually honour the documentation of subtitle_header | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt April 19, 2021, 2:06 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/exr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer April 19, 2021, 9:40 a.m. UTC | #1
On Mon, Apr 19, 2021 at 04:06:14AM +0200, Andreas Rheinhardt wrote:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/exr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

LGTM

thx

[...]
diff mbox series

Patch

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