diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-11-04 11:36:02 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2022-11-04 11:36:02 +0000 |
commit | afbd9cd5e83371cca74bd73b7445949ba52a7121 (patch) | |
tree | a74d8cadb9a725715d496118bc99d0b8483f6147 /content/handlers | |
parent | 7148d165a57695a6ba6c1c66f883d644d47675ba (diff) | |
download | netsurf-afbd9cd5e83371cca74bd73b7445949ba52a7121.tar.gz netsurf-afbd9cd5e83371cca74bd73b7445949ba52a7121.tar.bz2 |
gif: Mark gifs as complete after scanning source data
This allows libnsgif to distinguish between awaiting more
data, and a broken truncated GIF. In the latter case we
can display what we have.
Diffstat (limited to 'content/handlers')
-rw-r--r-- | content/handlers/image/gif.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/content/handlers/image/gif.c b/content/handlers/image/gif.c index deabd0adc..0b577f033 100644 --- a/content/handlers/image/gif.c +++ b/content/handlers/image/gif.c @@ -233,10 +233,12 @@ static bool gif_convert(struct content *c) /* Initialise the GIF */ gif_err = nsgif_data_scan(gif->gif, size, data); if (gif_err != NSGIF_OK) { - NSLOG(netsurf, DEBUG, "%s", nsgif_strerror(gif_err)); - /* Not fatal unless er have no frames. */ + NSLOG(netsurf, INFO, "nsgif scan: %s", nsgif_strerror(gif_err)); + /* Not fatal unless we have no frames. */ } + nsgif_data_complete(gif->gif); + gif_info = nsgif_get_info(gif->gif); assert(gif_info != NULL); |