diff --git a/media-layer/core/src/audio/file.cpp b/media-layer/core/src/audio/file.cpp index 34de48c50e..09925482e1 100644 --- a/media-layer/core/src/audio/file.cpp +++ b/media-layer/core/src/audio/file.cpp @@ -13,10 +13,12 @@ // Load Symbol From ELF File static void load_symbol(const char *source, const char *name, std::function callback) { - static std::unique_ptr binary = NULL; - if (binary == NULL) { - binary = LIEF::ELF::Parser::parse(source); + static std::unordered_map> sources = {}; + auto pos = sources.find(std::string(source)); + if (pos == sources.end()) { + sources[std::string(source)] = LIEF::ELF::Parser::parse(source); } + std::unique_ptr &binary = sources[std::string(source)]; const LIEF::ELF::Symbol *symbol = binary->get_dynamic_symbol(name); if (symbol != NULL) { LIEF::span data = binary->get_content_from_virtual_address(symbol->value(), symbol->size(), LIEF::Binary::VA_TYPES::VA);