This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.

View the commit online.

commit 4b4f72c7ffd476df6e450d84f7acb078808cb931
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Sat Apr 29 21:53:21 2023 +0200

    HEIF loader: Call heif_[de]init() on loader load/unload
    
    Seems to be required as of libheif-1.16.
    
    Note - Running the tests with valgrind shows no problems, but with asan
    enabled I get a bunch of messages like:
    
    Direct leak of 8 byte(s) in 1 object(s) allocated from:
        #0 0x7f186d98ee38 in operator new(unsigned long) (/lib64/libasan.so.8+0xd9e38) (BuildId: bac59ca9f1e357781008d7f6982314d30ca62672)
        #1 0x7f186c4acec9 in ColorConversionPipeline::init_ops() [clone .part.0] (/lib64/libheif.so.1+0x6fec9) (BuildId: 2823b8c3a24fbf4262672d27ed3bf5a338d185b5)
        #2 0x7f186c4a2dec in heif_init (/lib64/libheif.so.1+0x65dec) (BuildId: 2823b8c3a24fbf4262672d27ed3bf5a338d185b5)
        #3 0x7f186d824d4e in __imlib_ProduceLoader ../../../../src/lib/loaders.c:209
---
 src/modules/loaders/loader_heif.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/modules/loaders/loader_heif.c b/src/modules/loaders/loader_heif.c
index a9ddec4..0762c19 100644
--- a/src/modules/loaders/loader_heif.c
+++ b/src/modules/loaders/loader_heif.c
@@ -172,4 +172,21 @@ _load(ImlibImage * im, int load_data)
    return rc;
 }
 
+#if !LIBHEIF_HAVE_VERSION(1, 13, 0)
+
 IMLIB_LOADER_KEEP(_formats, _load, NULL);
+
+#else
+
+static void
+_inex(int init)
+{
+   if (init)
+      heif_init(NULL);
+   else
+      heif_deinit();
+}
+
+IMLIB_LOADER_INEX(_formats, _load, NULL, _inex);
+
+#endif

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to