mirror of
https://github.com/taglib/taglib.git
synced 2026-05-25 13:08:55 -04:00
e07b956fdadc7c3a1012f5293f1843de650585bf
Fix: Handle orphan ChapterAtom elements not wrapped in EditionEntry The Matroska specification requires every ChapterAtom to be inside an EditionEntry. However, some muxers (older FFmpeg versions, some streaming tools) produce files with ChapterAtom elements directly under Chapters, without an EditionEntry wrapper. MKVToolNix and FFmpeg both handle this case gracefully by treating orphan atoms as belonging to an implicit default edition. Previously, TagLib silently ignored these chapters, returning an empty ChapterEditionList. This change: - Collects orphan ChapterAtom elements encountered directly under Chapters - Wraps them in an implicit default edition (UID = 0, isDefault = true, isOrdered = false) so they are exposed through the existing chapterEditionList() API - Extracts the atom-parsing logic into a private parseChapterAtom() helper to avoid code duplication between the two call sites No existing behavior is changed - files that already conform to the spec (chapters inside an EditionEntry) parse identically.
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.6%
CMake
2.1%
C
0.9%
Logos
0.4%