The attached diff fixes this nasty issue: https://github.com/taglib/taglib/issues/864
It is easy to reproduce, for example with audio/clementine, see https://github.com/clementine-player/Clementine/issues/5524 ok?
Index: Makefile =================================================================== RCS file: /cvs/ports/audio/taglib/Makefile,v retrieving revision 1.43 diff -u -p -u -p -r1.43 Makefile --- Makefile 24 Oct 2018 14:27:58 -0000 1.43 +++ Makefile 20 Jun 2019 20:22:03 -0000 @@ -2,7 +2,7 @@ COMMENT= managing meta-data of audio formats DISTNAME= taglib-1.11.1 -REVISION= 1 +REVISION= 2 CATEGORIES= audio devel Index: patches/patch-taglib_ogg_oggfile_cpp =================================================================== RCS file: patches/patch-taglib_ogg_oggfile_cpp diff -N patches/patch-taglib_ogg_oggfile_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-taglib_ogg_oggfile_cpp 20 Jun 2019 20:22:03 -0000 @@ -0,0 +1,18 @@ +$OpenBSD$ + +Fix possible Ogg packet losses. +https://github.com/taglib/taglib/issues/864 +https://github.com/taglib/taglib/commit/9336c82 + +Index: taglib/ogg/oggfile.cpp +--- taglib/ogg/oggfile.cpp.orig ++++ taglib/ogg/oggfile.cpp +@@ -253,7 +253,7 @@ void Ogg::File::writePacket(unsigned int i, const Byte + ByteVectorList packets = firstPage->packets(); + packets[i - firstPage->firstPacketIndex()] = packet; + +- if(firstPage != lastPage && lastPage->packetCount() > 2) { ++ if(firstPage != lastPage && lastPage->packetCount() > 1) { + ByteVectorList lastPagePackets = lastPage->packets(); + lastPagePackets.erase(lastPagePackets.begin()); + packets.append(lastPagePackets);