diff mbox series

[FFmpeg-devel,110/134] avcodec/flashsv: Return error if initializing zlib fails

Message ID 20201130005454.110441-38-andreas.rheinhardt@gmail.com
State New
Headers show
Series [FFmpeg-devel,01/45] avcodec/a64multienc: Fix memleak upon init failure
Related show

Checks

Context Check Description
andriy/x86 warning Failed to apply patch

Commit Message

Andreas Rheinhardt Nov. 30, 2020, 12:54 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/flashsv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index f55cb0feeb..59de1820be 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -126,7 +126,7 @@  static av_cold int flashsv_decode_init(AVCodecContext *avctx)
     zret = inflateInit(&s->zstream);
     if (zret != Z_OK) {
         av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret);
-        return 1;
+        return AVERROR_EXTERNAL;
     }
     avctx->pix_fmt = AV_PIX_FMT_BGR24;