[xiph-commits] r9113 - icecast/branches/kh/icecast/src
karl at motherfish-iii.xiph.org
karl at motherfish-iii.xiph.org
Tue Apr 5 18:29:14 PDT 2005
Author: karl
Date: 2005-04-05 18:29:12 -0700 (Tue, 05 Apr 2005)
New Revision: 9113
Modified:
icecast/branches/kh/icecast/src/format.c
Log:
after sending intro file, place listener correctly on stream queue to
finish required burst
Modified: icecast/branches/kh/icecast/src/format.c
===================================================================
--- icecast/branches/kh/icecast/src/format.c 2005-04-05 18:08:23 UTC (rev 9112)
+++ icecast/branches/kh/icecast/src/format.c 2005-04-06 01:29:12 UTC (rev 9113)
@@ -95,10 +95,8 @@
return 0;
bytes = fread (refbuf->data, 1, 4096, intro);
if (bytes == 0)
- {
- client->intro_offset = 0;
return 0;
- }
+
refbuf->len = bytes;
return 1;
}
@@ -117,8 +115,16 @@
{
if (source->stream_data_tail)
{
+ refbuf_t *refbuf = source->burst_point;
+ int size = source->burst_size - client->intro_offset;
+ while (size > 0 && refbuf->next)
+ {
+ size -= refbuf->len;
+ refbuf = refbuf->next;
+ }
+ client->intro_offset = 0;
/* move client to stream */
- client_set_queue (client, source->stream_data_tail);
+ client_set_queue (client, refbuf);
client->write_to_client = source->format->write_buf_to_client;
}
else
More information about the commits
mailing list