icyName fix
git-svn-id: https://svn.musicpd.org/mpd/trunk@1271 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
4ba7779c89
commit
c38fcd30c7
@ -368,20 +368,24 @@ static int getHTTPHello(InputStream * inStream) {
|
|||||||
data->icyMetaint = atoi(cur+14);
|
data->icyMetaint = atoi(cur+14);
|
||||||
}
|
}
|
||||||
else if(0 == strncmp(cur, "\r\nicy-name:", 11)) {
|
else if(0 == strncmp(cur, "\r\nicy-name:", 11)) {
|
||||||
char * temp = strstr(cur+11,"\r\n");
|
int incr = 11;
|
||||||
|
char * temp = strstr(cur+incr,"\r\n");
|
||||||
if(!temp) break;
|
if(!temp) break;
|
||||||
*temp = '\0';
|
*temp = '\0';
|
||||||
if(inStream->metaTitle) free(inStream->metaTitle);
|
if(inStream->metaTitle) free(inStream->metaTitle);
|
||||||
inStream->metaTitle = strdup(cur+19);
|
while(*(incr+cur) == ' ') incr++;
|
||||||
|
inStream->metaTitle = strdup(cur+incr);
|
||||||
*temp = '\r';
|
*temp = '\r';
|
||||||
DEBUG("stream icy-name: %s\n", inStream->metaTitle);
|
DEBUG("stream icy-name: %s\n", inStream->metaTitle);
|
||||||
}
|
}
|
||||||
else if(0 == strncmp(cur, "\r\nx-audiocast-name:", 19)) {
|
else if(0 == strncmp(cur, "\r\nx-audiocast-name:", 19)) {
|
||||||
char * temp = strstr(cur+19,"\r\n");
|
int incr = 19;
|
||||||
|
char * temp = strstr(cur+incr,"\r\n");
|
||||||
if(!temp) break;
|
if(!temp) break;
|
||||||
*temp = '\0';
|
*temp = '\0';
|
||||||
if(inStream->metaTitle) free(inStream->metaTitle);
|
if(inStream->metaTitle) free(inStream->metaTitle);
|
||||||
inStream->metaTitle = strdup(cur+19);
|
while(*(incr+cur) == ' ') incr++;
|
||||||
|
inStream->metaTitle = strdup(cur+incr);
|
||||||
*temp = '\r';
|
*temp = '\r';
|
||||||
DEBUG("stream audiocast-name: %s\n",
|
DEBUG("stream audiocast-name: %s\n",
|
||||||
inStream->metaTitle);
|
inStream->metaTitle);
|
||||||
|
Loading…
Reference in New Issue
Block a user