From a09a5d2b471c4d89ed4966bcf8ce016839fa4e1c Mon Sep 17 00:00:00 2001 From: nikitalita <69168929+nikitalita@users.noreply.github.com> Date: Fri, 24 Oct 2025 09:47:48 -0700 Subject: [PATCH] AudioStreamOggVorbis: only show invalid comment warning in Editor --- modules/vorbis/audio_stream_ogg_vorbis.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp index 60b40d8a0ad..62c7e73956a 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp @@ -460,14 +460,19 @@ void AudioStreamOggVorbis::maybe_update_info() { } Dictionary dictionary; + // Comments are required by the Vorbis spec to be structured like env vars, i.e. VAR=VALUE. + // This is how tags are stored (artist, album, etc.), and we parse them out for display. + // See https://xiph.org/vorbis/doc/v-comment.html for (int i = 0; i < comment.comments; i++) { String c = String::utf8(comment.user_comments[i]); int equals = c.find_char('='); +#ifdef TOOLS_ENABLED if (equals == -1) { WARN_PRINT(vformat(R"(Invalid comment in Ogg Vorbis file "%s", should contain '=': "%s".)", get_path(), c)); continue; } +#endif String tag = c.substr(0, equals); String tag_value = c.substr(equals + 1);