WebmVorbisEncoder::make_vorbis_private_data(): Resolve esoteric optimisation errors under GCC15 by assigning directly

std::vector's reserve func was somehow optimised into providing non-stack data which emplace_back wasn't playing nice with!? What even is the point of these optimisations if a very basic call dies like that
This commit is contained in:
toaster 2025-05-18 15:51:00 +01:00
parent 471e11f4b5
commit b1af67bcaf

View file

@ -61,7 +61,8 @@ std::vector<std::byte> WebmVorbisEncoder::make_vorbis_private_data()
// The first byte is the number of packets. Once again,
// the last packet is not counted.
v.emplace_back(std::byte {2});
v.resize(1);
v[0] = std::byte {2};
// Then the laced sizes for each packet.
lace(v, packets[0]);