From b1af67bcaf65423bcd3b3b6a65aa904cf3a3bd40 Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 18 May 2025 15:51:00 +0100 Subject: [PATCH] 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 --- src/media/webm_vorbis_lace.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/media/webm_vorbis_lace.cpp b/src/media/webm_vorbis_lace.cpp index 45c564419..2c45d68ca 100644 --- a/src/media/webm_vorbis_lace.cpp +++ b/src/media/webm_vorbis_lace.cpp @@ -61,7 +61,8 @@ std::vector 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]);