From 2adb0b7eeaefd50a2f7a300b118f34bafe7bfa9f Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 2 Jun 2025 02:46:58 +0200 Subject: [PATCH WIP v2 02/10] fftools/resources/resman: Don't mix FFmpeg and zlib errors Also remove some always-false checks. Signed-off-by: Andreas Rheinhardt --- fftools/resources/resman.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/resources/resman.c b/fftools/resources/resman.c index fdf73c36d5..f910535750 100644 --- a/fftools/resources/resman.c +++ b/fftools/resources/resman.c @@ -100,7 +100,7 @@ static int decompress_zlib(ResourceManagerContext *ctx, uint8_t *in, unsigned in av_log(ctx, AV_LOG_ERROR, "Inflate failed: %d, %s\n", ret, strm.msg); inflateEnd(&strm); av_free(buf); - return (ret == Z_STREAM_END) ? Z_OK : ((ret == Z_OK) ? Z_BUF_ERROR : ret); + return AVERROR_EXTERNAL; } if (strm.avail_out == 0) { @@ -113,7 +113,7 @@ static int decompress_zlib(ResourceManagerContext *ctx, uint8_t *in, unsigned in inflateEnd(&strm); *out = (char *)buf; - return Z_OK; + return 0; } #endif -- 2.45.2