diff options
Diffstat (limited to 'junklib.c')
-rw-r--r-- | junklib.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,6 +1,6 @@ /* DeaDBeeF - ultimate music player for GNU/Linux systems with X11 - Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net> + Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -711,7 +711,8 @@ convstr_id3v2 (int version, uint8_t encoding, const unsigned char* str, int sz) } else { trace ("invalid ucs-2 signature %x %x\n", (int)str[0], (int)str[1]); - return NULL; + enc = "UCS-2LE"; + // NOTE: this is an assumption, might break in the future. } } else { @@ -735,7 +736,7 @@ convstr_id3v2 (int version, uint8_t encoding, const unsigned char* str, int sz) } // trim trailing linebreaks for (n = converted_sz-1; n >= 0; n--) { - if (out[n] == '\n') { + if ((uint8_t)out[n] <= 32) { out[n] = 0; } else { @@ -1129,6 +1130,7 @@ junk_apev2_add_frame (playItem_t *it, DB_apev2_tag_t *tag_store, DB_apev2_frame_ } } } + return 0; } int |