--- a/xine-lib-1.1.14/src/xine-engine/info_helper.c 2008-07-26 15:11:25.000000000 +0200 +++ b/xine-lib-1.1.14/src/xine-engine/info_helper.c 2008-07-26 15:34:00.000000000 +0200 @@ -318,9 +318,22 @@ * Set private meta info value using specified encoding. */ void _x_meta_info_set_generic(xine_stream_t *stream, int info, const char *str, const char *enc) { + size_t i, len, count; pthread_mutex_lock(&stream->meta_mutex); - if(str) - meta_info_set_unlocked_encoding(stream, info, str, enc); + + if(str) { + + len = strlen(str); + i = len - 1; + count = 0; + while ((i >= 0) && ((unsigned char)str[i] <= 32)) { + i--; + count++; + } + if (count != len) { + meta_info_set_unlocked_encoding(stream, info, str, enc); + } + } pthread_mutex_unlock(&stream->meta_mutex); }