Merge branch 'v0.20.x'
This commit is contained in:
@@ -60,7 +60,11 @@ icy_server_metadata_string(const char *stream_title, const char* stream_url)
|
||||
{
|
||||
// The leading n is a placeholder for the length information
|
||||
auto icy_metadata = FormatString("nStreamTitle='%s';"
|
||||
"StreamUrl='%s';",
|
||||
"StreamUrl='%s';"
|
||||
/* pad 15 spaces just in case
|
||||
the length needs to be
|
||||
rounded up */
|
||||
" ",
|
||||
stream_title,
|
||||
stream_url);
|
||||
|
||||
@@ -68,7 +72,7 @@ icy_server_metadata_string(const char *stream_title, const char* stream_url)
|
||||
|
||||
meta_length--; // subtract placeholder
|
||||
|
||||
meta_length = ((int)meta_length / 16) + 1;
|
||||
meta_length = meta_length / 16;
|
||||
|
||||
icy_metadata[0] = meta_length;
|
||||
|
||||
@@ -109,5 +113,5 @@ icy_server_metadata_page(const Tag &tag, const TagType *types)
|
||||
if (icy_string.IsNull())
|
||||
return nullptr;
|
||||
|
||||
return Page::Copy(icy_string.c_str(), (icy_string[0] * 16) + 1);
|
||||
return Page::Copy(icy_string.c_str(), uint8_t(icy_string[0]) * 16 + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user