diff --git a/src/audio_provider_factory.cpp b/src/audio_provider_factory.cpp index 58c375bb03..bc682474a9 100644 --- a/src/audio_provider_factory.cpp +++ b/src/audio_provider_factory.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include using namespace agi; @@ -42,7 +42,11 @@ struct factory { std::vector extensions; }; -const std::initializer_list providers = { +// This can't be a std::initializer_list: GCC (at least 13 to 16.2) zeroes the +// elements of one that can be constant-initialized (here, the ones with an +// empty extensions list) when others can't be, leaving a null name. +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126472 +const std::vector providers = { {"Dummy", CreateDummyAudioProvider, true, {}}, {"PCM", CreatePCMAudioProvider, true, {".w64", ".wav"}}, #ifdef WITH_FFMS2 diff --git a/src/video_provider_manager.cpp b/src/video_provider_manager.cpp index 97983f50a0..344dcc8a61 100644 --- a/src/video_provider_manager.cpp +++ b/src/video_provider_manager.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include std::unique_ptr CreateDummyVideoProvider(agi::fs::path const&, agi::ycbcr::Header, agi::BackgroundRunner *); std::unique_ptr CreateYUV4MPEGVideoProvider(agi::fs::path const&, agi::ycbcr::Header, agi::BackgroundRunner *); @@ -45,7 +45,11 @@ namespace { std::vector extensions; }; - const std::initializer_list providers = { + // This can't be a std::initializer_list: GCC (at least 13 to 16.2) zeroes the + // elements of one that can be constant-initialized (here, the ones with an + // empty extensions list) when others can't be, leaving a null name. + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126472 + const std::vector providers = { {"Dummy", CreateDummyVideoProvider, true, {}}, {"YUV4MPEG", CreateYUV4MPEGVideoProvider, true, {".y4m", ".yuv"}}, #ifdef WITH_FFMS2