mirror of
https://github.com/taglib/taglib.git
synced 2026-04-12 17:09:50 -04:00
5d63187a8b8d291cbf4f77d1bb973bc5ee91cf03
Concurrent calls to propertyKeyForName() and handlerTypeForName() (e.g. via batchMap during import) could race on the isEmpty() guard used for first-call lazy initialization. Replace isEmpty() guards with std::call_once / std::once_flag so that each map is initialized exactly once in a thread-safe manner. Using call_once (rather than eager construction in the base class constructor) preserves virtual dispatch, allowing ItemFactory subclasses to override nameHandlerMap() and namePropertyMap() correctly. Both property maps are initialized together in a single once_flag since nameForPropertyKey is derived from namePropertyMap.
TagLib
TagLib Audio Metadata Library
TagLib is a library for reading and editing the metadata of several popular audio formats. Currently, it supports various metadata containers such as ID3v1, ID3v2 and Vorbis comments for MP3, MP4, AAC, Ogg, Opus, FLAC, Speex, APE, MPC, WavPack, WAV, AIFF, TrueAudio, Matroska, WebM, ASF, WMA, DSF, DFF and tracker (MOD, XM, S3M, IT) files.
TagLib is distributed under the GNU Lesser General Public License (LGPL) and Mozilla Public License (MPL). Essentially that means that it may be used in proprietary applications, but if changes are made to TagLib they must be contributed back to the project. Please review the licenses if you are considering using TagLib in your project.
Description
Languages
C++
96.4%
CMake
2.2%
C
1%
Logos
0.4%