diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-12-13 17:39:15 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-12-13 19:05:23 +0100 |
commit | 9eb9cc44aa1b7dcb5b3bef86b3ae620e1d0d789c (patch) | |
tree | 98f03ecce163f087d32a37b87ece85a589f1de44 /fastiv-io.c | |
parent | e161f77359f5b9087742e0b5b5b1eba6af47b2a7 (diff) | |
download | fiv-9eb9cc44aa1b7dcb5b3bef86b3ae620e1d0d789c.tar.gz fiv-9eb9cc44aa1b7dcb5b3bef86b3ae620e1d0d789c.tar.xz fiv-9eb9cc44aa1b7dcb5b3bef86b3ae620e1d0d789c.zip |
Clean up
Diffstat (limited to 'fastiv-io.c')
-rw-r--r-- | fastiv-io.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fastiv-io.c b/fastiv-io.c index 99a48e5..f99c385 100644 --- a/fastiv-io.c +++ b/fastiv-io.c @@ -1283,19 +1283,22 @@ open_libwebp(const gchar *data, gsize len, const gchar *path, GError **error) goto fail; } + // Releasing the demux chunk iterator is actually a no-op. + WebPChunkIterator chunk_iter = {}; uint32_t flags = WebPDemuxGetI(demux, WEBP_FF_FORMAT_FLAGS); - WebPChunkIterator chunk_iter; if ((flags & ICCP_FLAG) && WebPDemuxGetChunk(demux, "ICCP", 1, &chunk_iter)) { cairo_surface_set_user_data(result, &fastiv_io_key_icc, g_bytes_new(chunk_iter.chunk.bytes, chunk_iter.chunk.size), (cairo_destroy_func_t) g_bytes_unref); + WebPDemuxReleaseChunkIterator(&chunk_iter); } if ((flags & EXIF_FLAG) && WebPDemuxGetChunk(demux, "EXIF", 1, &chunk_iter)) { cairo_surface_set_user_data(result, &fastiv_io_key_exif, g_bytes_new(chunk_iter.chunk.bytes, chunk_iter.chunk.size), (cairo_destroy_func_t) g_bytes_unref); + WebPDemuxReleaseChunkIterator(&chunk_iter); } if (flags & ANIMATION_FLAG) { cairo_surface_set_user_data(result, &fastiv_io_key_loops, @@ -1303,7 +1306,6 @@ open_libwebp(const gchar *data, gsize len, const gchar *path, GError **error) NULL); } - WebPDemuxReleaseChunkIterator(&chunk_iter); WebPDemuxDelete(demux); fail: |