summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2022-02-26 13:26:41 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2022-02-26 13:26:41 +0000
commitff86c40667cdaa2a535c992f908ba15912d93d59 (patch)
tree730445a3c6d9a8fc8d6115d4c12672530656565a
parenta0b9fcb4fa4c53319726044c8278a551293af817 (diff)
downloadlibnsgif-ff86c40667cdaa2a535c992f908ba15912d93d59.tar.gz
libnsgif-ff86c40667cdaa2a535c992f908ba15912d93d59.tar.bz2
GIF: Minimum gif delay shouldn't be public.
-rw-r--r--include/nsgif.h2
-rw-r--r--src/gif.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/nsgif.h b/include/nsgif.h
index f03d121..550fea3 100644
--- a/include/nsgif.h
+++ b/include/nsgif.h
@@ -35,8 +35,6 @@ typedef struct nsgif_info {
int loop_max;
/** number of animation loops so far */
int loop_count;
-
- uint16_t delay_min;
} nsgif_info_t;
/**
diff --git a/src/gif.c b/src/gif.c
index 3374b1e..b8af0b3 100644
--- a/src/gif.c
+++ b/src/gif.c
@@ -69,7 +69,9 @@ struct nsgif {
/** currently decoded image; stored as bitmap from bitmap_create callback */
nsgif_bitmap_t *frame_image;
+ uint16_t delay_min;
uint16_t delay_default;
+
/** number of frames partially decoded */
uint32_t frame_count_partial;
@@ -735,7 +737,7 @@ static nsgif_error nsgif__parse_extension_graphic_control(
}
frame->frame_delay = data[3] | (data[4] << 8);
- if (frame->frame_delay < gif->info.delay_min) {
+ if (frame->frame_delay < gif->delay_min) {
frame->frame_delay = gif->delay_default;
}
@@ -1309,7 +1311,7 @@ nsgif_error nsgif_create(const nsgif_bitmap_cb_vt *bitmap_vt, nsgif **gif_out)
gif->decoded_frame = NSGIF_FRAME_INVALID;
gif->prev_index = NSGIF_FRAME_INVALID;
- gif->info.delay_min = 2;
+ gif->delay_min = 2;
gif->delay_default = 10;
*gif_out = gif;