From c1a563fb46848d5228ba2d2359133a7097c9a499 Mon Sep 17 00:00:00 2001 From: Dirk Farin Date: Mon, 9 Oct 2023 10:04:09 +0200 Subject: [PATCH] fix plugin initialization without heif_init() (fixes #974) --- libheif/heif.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libheif/heif.cc b/libheif/heif.cc index 348738c6d1..f1359ee7f3 100644 --- a/libheif/heif.cc +++ b/libheif/heif.cc @@ -30,6 +30,7 @@ #include "plugin_registry.h" #include "error.h" #include "bitstream.h" +#include "init.h" #include #include @@ -436,6 +437,8 @@ const char* heif_get_file_mime_type(const uint8_t* data, int len) heif_context* heif_context_alloc() { + load_plugins_if_not_initialized_yet(); + struct heif_context* ctx = new heif_context; ctx->context = std::make_shared();