summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/tinyff/image/png.h2
-rw-r--r--src/format/image/png.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/include/tinyff/image/png.h b/include/tinyff/image/png.h
index 000f186..05d5846 100644
--- a/include/tinyff/image/png.h
+++ b/include/tinyff/image/png.h
@@ -98,7 +98,7 @@ const ff_png_chunk_handler ff_png_chunk_handlers[] = {
ff_result ff_png_isvalid(ff_stream *stream);
-ff_result ff_open_png(ff_stream *stream, ff_png_ctx **out_ctx);
+ff_result ff_open_png(ff_stream *stream, ff_png_ctx **out_ctx, ff_flag require_valid);
ff_result ff_png_normalize(ff_png_ctx *ctx, ff_image_ctx **out_data);
diff --git a/src/format/image/png.c b/src/format/image/png.c
index a3c4176..fd9837b 100644
--- a/src/format/image/png.c
+++ b/src/format/image/png.c
@@ -32,9 +32,11 @@ ff_result ff_png_isvalid(ff_stream *stream)
return FF_RESULT_OK;
}
-ff_result ff_open_png(ff_stream *stream, ff_png_ctx **out_ctx)
+ff_result ff_open_png(ff_stream *stream, ff_png_ctx **out_ctx, ff_flag require_valid)
{
-
+
+ (void)require_valid; // Just cast to void for now until I impl
+
ff_png_ctx *ctx = malloc(sizeof(ff_png_ctx));
if (!ctx) {
ctx->last_error = FF_RESULT_ERROR_MEMORY_ALLOCATION;