[xiph-commits] r8002 - icecast/branches/kh/icecast/src
karl at motherfish-iii.xiph.org
karl at motherfish-iii.xiph.org
Thu Oct 14 13:33:26 PDT 2004
Author: karl
Date: 2004-10-14 13:33:25 -0700 (Thu, 14 Oct 2004)
New Revision: 8002
Modified:
icecast/branches/kh/icecast/src/cfgfile.c
icecast/branches/kh/icecast/src/connection.c
icecast/branches/kh/icecast/src/format_vorbis.c
Log:
small updates, fix small memory leaks, unintialised pointer and sync stat
names with multi-codec module for consistency
Modified: icecast/branches/kh/icecast/src/cfgfile.c
===================================================================
--- icecast/branches/kh/icecast/src/cfgfile.c 2004-10-14 17:21:46 UTC (rev 8001)
+++ icecast/branches/kh/icecast/src/cfgfile.c 2004-10-14 20:33:25 UTC (rev 8002)
@@ -219,7 +219,7 @@
free(dirnode);
dirnode = nextdirnode;
}
-#ifdef HAVE_YP
+#ifdef USE_YP
i = 0;
while (i < c->num_yp_directories)
{
Modified: icecast/branches/kh/icecast/src/connection.c
===================================================================
--- icecast/branches/kh/icecast/src/connection.c 2004-10-14 17:21:46 UTC (rev 8001)
+++ icecast/branches/kh/icecast/src/connection.c 2004-10-14 20:33:25 UTC (rev 8002)
@@ -480,7 +480,7 @@
return 0;
}
- WARN1("Request to add source when maximum source limit"
+ WARN1("Request to add source when maximum source limit "
"reached %d", global.sources);
global_unlock();
Modified: icecast/branches/kh/icecast/src/format_vorbis.c
===================================================================
--- icecast/branches/kh/icecast/src/format_vorbis.c 2004-10-14 17:21:46 UTC (rev 8001)
+++ icecast/branches/kh/icecast/src/format_vorbis.c 2004-10-14 20:33:25 UTC (rev 8002)
@@ -118,7 +118,7 @@
vstate_t *state;
vorbis_comment vc;
- plugin = (format_plugin_t *)malloc(sizeof(format_plugin_t));
+ plugin = (format_plugin_t *)calloc(1, sizeof(format_plugin_t));
plugin->type = FORMAT_TYPE_OGG;
plugin->format_description = "Ogg Vorbis";
@@ -162,6 +162,14 @@
if (state->prev_packet)
free_ogg_packet (state->prev_packet);
+ while (state->headers_head)
+ {
+ refbuf_t *to_go = state->headers_head;
+ state->headers_head = to_go->next;
+ /* printf ("releasing vorbis header %p\n", to_go); */
+ refbuf_release (to_go);
+ }
+
ogg_packet_clear (&state->url_comment);
free (state);
@@ -294,7 +302,6 @@
}
ogg_stream_clear (&source_vorbis->out_os);
ogg_stream_init (&source_vorbis->out_os, get_next_serialno());
- printf ("clearing up header pages \n");
refbuf = source_vorbis->headers_head;
while (refbuf)
{
@@ -442,9 +449,9 @@
tag = "unknown";
stats_event (source->mount, "artist", tag);
- stats_event_args (source->mount, "ice-samplerate", "%ld", (long)source_vorbis->vi.rate);
- stats_event_args (source->mount, "ice-channels", "%ld", (long)source_vorbis->vi.channels);
- stats_event_args (source->mount, "ice-bitrate", "%ld", (long)source_vorbis->vi.bitrate_nominal/1024);
+ stats_event_args (source->mount, "audio-samplerate", "%ld", (long)source_vorbis->vi.rate);
+ stats_event_args (source->mount, "audio-channels", "%ld", (long)source_vorbis->vi.channels);
+ stats_event_args (source->mount, "audio-bitrate", "%ld", (long)source_vorbis->vi.bitrate_nominal);
/* set queued pages to contain a 1/4 of a second worth of samples */
source_vorbis->page_samples_trigger = source_vorbis->vi.rate / 4;
More information about the commits
mailing list