diff options
| author | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-04-14 11:10:01 +1000 |
|---|---|---|
| committer | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-04-14 11:10:01 +1000 |
| commit | d19fb342ca3348b9e4c8a10393238db52f04be2b (patch) | |
| tree | b56d094b73e0392283811cf3a322e7fe5ac0c21e | |
| parent | 2c526ed41bf81a3c7e0438661fd87d2480221f34 (diff) | |
fix(png): Test requires FF_RESULT_OK to work
v0.1.0 lets gooooooo
| -rw-r--r-- | tests/format/image/png/png_open.c | 8 |
1 files changed, 6 insertions, 2 deletions
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");
|
