[xiph-commits] r9312 - icecast/branches/kh/icecast/src
karl at motherfish-iii.xiph.org
karl at motherfish-iii.xiph.org
Wed May 25 08:20:59 PDT 2005
Author: karl
Date: 2005-05-25 08:20:56 -0700 (Wed, 25 May 2005)
New Revision: 9312
Modified:
icecast/branches/kh/icecast/src/source.c
Log:
handle changes to burst setting mid-stream
Modified: icecast/branches/kh/icecast/src/source.c
===================================================================
--- icecast/branches/kh/icecast/src/source.c 2005-05-25 14:27:33 UTC (rev 9311)
+++ icecast/branches/kh/icecast/src/source.c 2005-05-25 15:20:56 UTC (rev 9312)
@@ -537,16 +537,17 @@
/* move the starting point for new listeners */
source->burst_offset += refbuf->len;
- if (source->burst_offset > source->burst_size)
+ while (source->burst_offset > source->burst_size)
{
- if (source->burst_point->next)
+ refbuf_t *to_release = source->burst_point;
+ if (to_release->next)
{
- refbuf_t *to_go = source->burst_point;
-
- source->burst_offset -= source->burst_point->len;
- source->burst_point = source->burst_point->next;
- refbuf_release (to_go);
+ source->burst_offset -= to_release->len;
+ source->burst_point = to_release->next;
+ refbuf_release (to_release);
+ continue;
}
+ break;
}
/* save stream to file */
More information about the commits
mailing list