diff options
author | waker <wakeroid@gmail.com> | 2011-08-31 21:23:55 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-08-31 21:23:55 +0200 |
commit | 57f9c098e8f5b582c8f289d181117cec1a52e653 (patch) | |
tree | 32770b31fa308531c2f524f6f88eeeb364ca18e8 /junklib.c | |
parent | 130b06b3505bbd1a21c09a046345bd9fdddafc18 (diff) |
fixed writing non-ascii id3v1 tags
Diffstat (limited to 'junklib.c')
-rw-r--r-- | junklib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -877,7 +877,7 @@ junk_id3v1_read (playItem_t *it, DB_FILE *fp) { } int -junk_id3v1_write (FILE *fp, playItem_t *it) { +junk_id3v1_write (FILE *fp, playItem_t *it, const char *enc) { char title[30] = ""; char artist[30] = ""; char album[30] = ""; @@ -893,7 +893,7 @@ junk_id3v1_write (FILE *fp, playItem_t *it) { meta = pl_find_meta (it, name);\ if (meta) {\ char temp[1000];\ - int l = junk_iconv (meta, strlen (meta), temp, sizeof (temp), UTF8_STR, "ASCII");\ + int l = junk_iconv (meta, strlen (meta), temp, sizeof (temp), UTF8_STR, enc);\ if (l == -1) {\ memset (store, 0, sizeof (store));\ }\ @@ -3731,7 +3731,7 @@ junk_rewrite_tags (playItem_t *it, uint32_t junk_flags, int id3v2_version, const } else if (write_id3v1) { trace ("writing new id3v1 tag\n"); - if (junk_id3v1_write (out, it) != 0) { + if (junk_id3v1_write (out, it, id3v1_encoding) != 0) { trace ("cmp3_write_metadata: failed to write id3v1 tag to %s\n", pl_find_meta (it, ":URI")) goto error; } |