summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2022-03-07 19:39:58 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2022-03-07 19:39:58 +0000
commit716e0fae9a007e7c3c5d52cfb7354b139f851b6d (patch)
treeedd7ba125204312facdda4639b917b446452060a
parent8019292b7adabf81794dddf6bcf126d440ab229f (diff)
downloadlibnsgif-716e0fae9a007e7c3c5d52cfb7354b139f851b6d.tar.gz
libnsgif-716e0fae9a007e7c3c5d52cfb7354b139f851b6d.tar.bz2
Docs: Update README to mention nsgif_data_scan errors.
-rw-r--r--README.md13
1 files changed, 9 insertions, 4 deletions
diff --git a/README.md b/README.md
index cb380c3..63ccdc7 100644
--- a/README.md
+++ b/README.md
@@ -49,10 +49,15 @@ Now you can load the GIF source data into the nsgif object with
This scans the source data and decodes information about each frame, however
it doesn't decode any of the bitmap data for the frames. The client may call
-`nsgif_data_scan()` multiple times as source data is fetched. Once the
-function has returned `NSGIF_OK` it has enough data to display at least one
-frame. The early frames can be decoded before the later frames are scanned.
-Frames have to be scanned before they can be decoded.
+`nsgif_data_scan()` multiple times as source data is fetched. The early frames
+can be decoded before the later frames are scanned. Frames have to be scanned
+before they can be decoded.
+
+This function will sometimes return an error. That is OK, and even expected.
+It is fine to proceed to decoding any frames that are available after a scan.
+Some errors indicate that there is a flaw in the source GIF data (not at all
+uncommon, GIF is an ancient format that has had many broken encoders), or that
+it has reached the end of the source data.
> **Note**: The client must not free the data until after calling
> `nsgif_destroy()`. You can move the data, e.g. if you realloc to a bigger