From d19fb342ca3348b9e4c8a10393238db52f04be2b Mon Sep 17 00:00:00 2001 From: TazyFoundSoup Date: Tue, 14 Apr 2026 11:10:01 +1000 Subject: fix(png): Test requires FF_RESULT_OK to work v0.1.0 lets gooooooo --- tests/format/image/png/png_open.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/format') diff --git a/tests/format/image/png/png_open.c b/tests/format/image/png/png_open.c index 030c7cf..2e02426 100644 --- a/tests/format/image/png/png_open.c +++ b/tests/format/image/png/png_open.c @@ -17,7 +17,11 @@ ff_result fftest_rgb2x2(ff_ctx* ctx) { ff_result res = ff_open_png(ctx, &stream, &png_ctx, FF_ENABLE); fclose(file); - + if (png_ctx) { + if (png_ctx->data.pixels) ctx->allocator.ff_free(png_ctx->data.pixels); + if (png_ctx->palette) ctx->allocator.ff_free(png_ctx->palette); + ctx->allocator.ff_free(png_ctx); + } // go free little butterfly return res; } @@ -30,7 +34,7 @@ int main() { ff_result res = fftest_rgb2x2(ctx); - if (res == FF_RESULT_WARN_NO_IMPL) { + if (res == FF_RESULT_OK) { printf("Works!\n"); } else { printf("Doesn't work :(\n"); -- cgit v1.2.3