Mercurial > audlegacy-plugins
diff src/mpg123/http.c @ 224:f6bdf10fe48c trunk
[svn] - shoutcast streams don't have a length.
| author | nenolod |
|---|---|
| date | Sun, 05 Nov 2006 12:50:07 -0800 |
| parents | 1e2d575fd2e7 |
| children | aed7c10085e0 |
line wrap: on
line diff
--- a/src/mpg123/http.c Sun Nov 05 12:36:34 2006 -0800 +++ b/src/mpg123/http.c Sun Nov 05 12:50:07 2006 -0800 @@ -592,8 +592,14 @@ if ((cnt = mpgdec_http_read_line(line, 1024)) != -1) { if (!cnt) break; - if (!strncmp(line, "icy-name:", 9)) + if (!strncasecmp(line, "content-length:", 15)) { + mpgdec_info->filesize = atoi(line + 16); + } + else if (!strncmp(line, "icy-name:", 9)) + { + mpgdec_info->filesize = 0; icy_name = g_strdup(line + 9); + } else if (!strncmp(line, "x-audiocast-name:", 17)) icy_name = g_strdup(line + 17); if (!strncmp(line, "icy-metaint:", 12)) @@ -607,10 +613,6 @@ /* udp_serverport = atoi (line + 20); */ } - - if (!strncasecmp(line, "content-length:", 15)) { - mpgdec_info->filesize = atoi(line + 15); - } } else { eof = TRUE;
