Gitweb links:
...log
http://git.netsurf-browser.org/libnsgif.git/shortlog/8019292b7adabf81794dddf6bcf126d440ab229f
...commit
http://git.netsurf-browser.org/libnsgif.git/commit/8019292b7adabf81794dddf6bcf126d440ab229f
...tree
http://git.netsurf-browser.org/libnsgif.git/tree/8019292b7adabf81794dddf6bcf126d440ab229f
The branch, master has been updated
discards 6bfea8c514b5aaefac83914a5db475cc63ce8f41 (commit)
via 8019292b7adabf81794dddf6bcf126d440ab229f (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (6bfea8c514b5aaefac83914a5db475cc63ce8f41)
\
N -- N -- N (8019292b7adabf81794dddf6bcf126d440ab229f)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/libnsgif.git/commit/?id=8019292b7adabf81794dddf6bcf126d440ab229f
commit 8019292b7adabf81794dddf6bcf126d440ab229f
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Test: Make decoder more tolerant of bad gifs.
This makes us keep going if the scan or a frame decode fails,
ensuring everything is tested.
diff --git a/test/nsgif.c b/test/nsgif.c
index bac9061..76d7b8f 100644
--- a/test/nsgif.c
+++ b/test/nsgif.c
@@ -207,21 +207,21 @@ static void decode(FILE* ppm, const char *name, nsgif_t
*gif)
}
frame_prev = frame_new;
- err = nsgif_frame_decode(gif, frame_new, &bitmap);
- if (err != NSGIF_OK) {
- warning("nsgif_decode_frame", err);
- return;
- }
-
if (nsgif_options.info == true) {
const nsgif_frame_info_t *f_info;
f_info = nsgif_get_frame_info(gif, frame_new);
- assert(f_info != NULL);
- print_gif_frame_info(f_info);
+ if (f_info != NULL) {
+ print_gif_frame_info(f_info);
+ }
}
- if (ppm != NULL) {
+ err = nsgif_frame_decode(gif, frame_new, &bitmap);
+ if (err != NSGIF_OK) {
+ warning("nsgif_decode_frame", err);
+ /* Continue decoding the rest of the frames. */
+
+ } else if (ppm != NULL) {
fprintf(ppm, "# frame %u:\n", frame_new);
image = (const uint8_t *) bitmap;
for (uint32_t y = 0; y != info->height; y++) {
@@ -284,10 +284,9 @@ int main(int argc, char *argv[])
/* Scan the raw data */
err = nsgif_data_scan(gif, size, data);
if (err != NSGIF_OK) {
+ /* Not fatal; some GIFs are nasty. Can still try to decode
+ * any frames that were decoded successfully. */
warning("nsgif_data_scan", err);
- nsgif_destroy(gif);
- free(data);
- return EXIT_FAILURE;
}
if (nsgif_options.loops == 0) {
-----------------------------------------------------------------------
Summary of changes:
--
NetSurf GIF Decoder
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]