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>
pull/362/head
Andreas Rheinhardt 4 years ago
parent a1ed984e04
commit da6e137cb6
  1. 2
      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;
}

Loading…
Cancel
Save