From 933c16fe6177f26cfe76d360ebb23710ae617d3b Mon Sep 17 00:00:00 2001 From: "v.audacity" Date: Sat, 31 Aug 2013 02:42:26 +0000 Subject: [PATCH] Joel Bouchat's patch for bug 51 (!) --- src/export/ExportMP3.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/export/ExportMP3.cpp b/src/export/ExportMP3.cpp index 75ef58480..94a0e590d 100644 --- a/src/export/ExportMP3.cpp +++ b/src/export/ExportMP3.cpp @@ -2033,14 +2033,18 @@ void ExportMP3::AddFrame(struct id3_tag *tp, const wxString & n, const wxString id3_ucs4_t *ucs4 = id3_utf8_ucs4duplicate((id3_utf8_t *) (const char *) v.mb_str(wxConvUTF8)); - if (strcmp(name, ID3_FRAME_COMMENT) == 0) { + if (strcmp(name, ID3_FRAME_COMMENT) == 0) { // A hack to get around iTunes not recognizing the comment. The // language defaults to XXX and, since it's not a valid language, // iTunes just ignores the tag. So, either set it to a valid language // (which one???) or just clear it. Unfortunately, there's no supported // way of clearing the field, so do it directly. - id3_field *f = id3_frame_field(frame, 1); - memset(f->immediate.value, 0, sizeof(f->immediate.value)); + struct id3_frame *frame2 = id3_frame_new(name); + id3_field_setfullstring(id3_frame_field(frame2, 3), ucs4); + id3_field *f2 = id3_frame_field(frame2, 1); + memset(f2->immediate.value, 0, sizeof(f2->immediate.value)); + id3_tag_attachframe(tp, frame2); + // Now install a second frame with the standard default language = "XXX" id3_field_setfullstring(id3_frame_field(frame, 3), ucs4); } else if (strcmp(name, "TXXX") == 0) {