[xiph-commits] r8132 - icecast/branches/kh/icecast/src

karl at motherfish-iii.xiph.org karl at motherfish-iii.xiph.org
Fri Oct 29 10:09:37 PDT 2004


Author: karl
Date: 2004-10-29 10:09:37 -0700 (Fri, 29 Oct 2004)
New Revision: 8132

Modified:
   icecast/branches/kh/icecast/src/format_vorbis.c
   icecast/branches/kh/icecast/src/source.c
Log:
fixup client buffer refcounting for vorbis rewrite module as the original
mechanism can cause bad pointers now, the other fixes are minor.


Modified: icecast/branches/kh/icecast/src/format_vorbis.c
===================================================================
--- icecast/branches/kh/icecast/src/format_vorbis.c	2004-10-29 15:31:56 UTC (rev 8131)
+++ icecast/branches/kh/icecast/src/format_vorbis.c	2004-10-29 17:09:37 UTC (rev 8132)
@@ -768,8 +768,8 @@
 
     if (refbuf->next && client->pos == refbuf->len)
     {
-        client->refbuf = refbuf->next;
-        client->pos = 0;
+        client_set_queue (client, refbuf->next);
+        refbuf = client->refbuf;
     }
     refbuf = client->refbuf;
     buf = refbuf->data + client->pos;

Modified: icecast/branches/kh/icecast/src/source.c
===================================================================
--- icecast/branches/kh/icecast/src/source.c	2004-10-29 15:31:56 UTC (rev 8131)
+++ icecast/branches/kh/icecast/src/source.c	2004-10-29 17:09:37 UTC (rev 8132)
@@ -637,9 +637,11 @@
             {
                 if (source->burst_point->next)
                 {
-                    refbuf_release (source->burst_point);
+                    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);
                 }
             }
 
@@ -1154,7 +1156,7 @@
                 if (source->running)
                 {
                     util_dict_set (source->audio_info, name, esc);
-                    stats_event (source->mount, name, value);
+                    stats_event (source->mount, name, esc);
                 }
                 free (esc);
             }



More information about the commits mailing list