|
|
* Set private meta info value using specified encoding. | * 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) { | 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); | 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); | pthread_mutex_unlock(&stream->meta_mutex); |
} | } |
| |