|
|
@@ -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);
|