[xiph-commits] r14786 - icecast/trunk/icecast/src
karl at svn.xiph.org
karl at svn.xiph.org
Tue Apr 22 17:32:20 PDT 2008
Author: karl
Date: 2008-04-22 17:32:20 -0700 (Tue, 22 Apr 2008)
New Revision: 14786
Modified:
icecast/trunk/icecast/src/format.c
icecast/trunk/icecast/src/format_ogg.c
Log:
handle new content-types
Modified: icecast/trunk/icecast/src/format.c
===================================================================
--- icecast/trunk/icecast/src/format.c 2008-04-22 22:51:35 UTC (rev 14785)
+++ icecast/trunk/icecast/src/format.c 2008-04-23 00:32:20 UTC (rev 14786)
@@ -60,6 +60,10 @@
return FORMAT_TYPE_OGG; /* Backwards compatibility */
else if(strcmp(contenttype, "application/ogg") == 0)
return FORMAT_TYPE_OGG; /* Now blessed by IANA */
+ else if(strcmp(contenttype, "audio/ogg") == 0)
+ return FORMAT_TYPE_OGG;
+ else if(strcmp(contenttype, "video/ogg") == 0)
+ return FORMAT_TYPE_OGG;
else
/* We default to the Generic format handler, which
can handle many more formats than just mp3 */
@@ -203,13 +207,13 @@
{
DEBUG0("processing pending client headers");
- client->respcode = 200;
if (format_prepare_headers (source, client) < 0)
{
ERROR0 ("internal problem, dropping client");
client->con->error = 1;
return -1;
}
+ client->respcode = 200;
stats_event_inc (NULL, "listeners");
stats_event_inc (NULL, "listener_connections");
stats_event_inc (source->mount, "listener_connections");
Modified: icecast/trunk/icecast/src/format_ogg.c
===================================================================
--- icecast/trunk/icecast/src/format_ogg.c 2008-04-22 22:51:35 UTC (rev 14785)
+++ icecast/trunk/icecast/src/format_ogg.c 2008-04-23 00:32:20 UTC (rev 14786)
@@ -170,7 +170,9 @@
plugin->create_client_data = create_ogg_client_data;
plugin->free_plugin = format_ogg_free_plugin;
plugin->set_tag = NULL;
- plugin->contenttype = "application/ogg";
+ if (strcmp (httpp_getvar (source->parser, "content-type"), "application/x-ogg") == 0)
+ httpp_setvar (source->parser, "content-type", "application/ogg");
+ plugin->contenttype = httpp_getvar (source->parser, "content-type");
ogg_sync_init (&state->oy);
More information about the commits
mailing list