Commit e21a3fc1 authored by brendan's avatar brendan

Convert ice headers to icy headers for MP3 streams.

TODO: rewrite ice-audio-info bitrate tag to icy-br.

svn path=/trunk/icecast/; revision=5045
parent 205d225b
/* -*- c-basic-offset: 4; -*- */
/* format.c
**
** format plugin implementation
......@@ -107,11 +108,15 @@ void format_send_general_headers(format_plugin_t *format,
node = avl_get_first(source->parser->vars);
while (node) {
var = (http_var_t *)node->key;
if (strcasecmp(var->name, "ice-password") &&
strcasecmp(var->name, "icy-metaint") &&
(!strncasecmp("ice-", var->name, 4) ||
!strncasecmp("icy-", var->name, 4))) {
bytes = sock_write(client->con->sock,
if (strcasecmp(var->name, "ice-password") &&
strcasecmp(var->name, "icy-metaint") &&
(!strncasecmp("ice-", var->name, 4) ||
!strncasecmp("icy-", var->name, 4))) {
if (source->format->type == FORMAT_TYPE_MP3)
bytes = sock_write(client->con->sock, "icy%s:%s\r\n",
var->name + 3, var->value);
else
bytes = sock_write(client->con->sock,
"%s: %s\r\n", var->name, var->value);
if(bytes > 0) client->con->sent_bytes += bytes;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment