Lines 318-326
Link Here
|
318 |
* Set private meta info value using specified encoding. |
318 |
* Set private meta info value using specified encoding. |
319 |
*/ |
319 |
*/ |
320 |
void _x_meta_info_set_generic(xine_stream_t *stream, int info, const char *str, const char *enc) { |
320 |
void _x_meta_info_set_generic(xine_stream_t *stream, int info, const char *str, const char *enc) { |
|
|
321 |
size_t i, len, count; |
321 |
pthread_mutex_lock(&stream->meta_mutex); |
322 |
pthread_mutex_lock(&stream->meta_mutex); |
322 |
if(str) |
323 |
|
323 |
meta_info_set_unlocked_encoding(stream, info, str, enc); |
324 |
if(str) { |
|
|
325 |
|
326 |
len = strlen(str); |
327 |
i = len - 1; |
328 |
count = 0; |
329 |
while ((i >= 0) && ((unsigned char)str[i] <= 32)) { |
330 |
i--; |
331 |
count++; |
332 |
} |
333 |
if (count != len) { |
334 |
meta_info_set_unlocked_encoding(stream, info, str, enc); |
335 |
} |
336 |
} |
324 |
pthread_mutex_unlock(&stream->meta_mutex); |
337 |
pthread_mutex_unlock(&stream->meta_mutex); |
325 |
} |
338 |
} |
326 |
|
339 |
|