Skip to content

Commit

Permalink
fix plugin initialization without heif_init() (fixes #974)
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Oct 9, 2023
1 parent c679a76 commit c1a563f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libheif/heif.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "plugin_registry.h"
#include "error.h"
#include "bitstream.h"
#include "init.h"
#include <set>
#include <limits>

Expand Down Expand Up @@ -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<HeifContext>();

Expand Down

0 comments on commit c1a563f

Please sign in to comment.