From: Tsuda Kageyu Date: Thu, 1 Dec 2016 02:32:01 +0000 (+0900) Subject: Fix possible Ogg packet losses. X-Git-Tag: v1.12-beta-1~103 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9336c82da3a04552168f208cd7a5fa4646701ea4;p=taglib Fix possible Ogg packet losses. --- diff --git a/taglib/ogg/oggfile.cpp b/taglib/ogg/oggfile.cpp index 86b0b076..c36e4d46 100644 --- a/taglib/ogg/oggfile.cpp +++ b/taglib/ogg/oggfile.cpp @@ -253,7 +253,7 @@ void Ogg::File::writePacket(unsigned int i, const ByteVector &packet) 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);