[xiph-commits] r15276 - icecast/trunk/icecast/src

karl at svn.xiph.org karl at svn.xiph.org
Mon Sep 8 19:18:23 PDT 2008


Author: karl
Date: 2008-09-08 19:18:22 -0700 (Mon, 08 Sep 2008)
New Revision: 15276

Modified:
   icecast/trunk/icecast/src/compat.h
   icecast/trunk/icecast/src/format_theora.c
   icecast/trunk/icecast/src/slave.c
   icecast/trunk/icecast/src/source.c
Log:
fix starting point problem with low bandwidth theroa streams. listener could
connect and be waiting a while before receiving stream content.

When retrieving streamlist, don't wait too long for connection to master

schedule a full stats rebuild on source disconnect.

Minor build fix for certain platforms with missing defines


Modified: icecast/trunk/icecast/src/compat.h
===================================================================
--- icecast/trunk/icecast/src/compat.h	2008-09-09 00:11:44 UTC (rev 15275)
+++ icecast/trunk/icecast/src/compat.h	2008-09-09 02:18:22 UTC (rev 15276)
@@ -53,5 +53,10 @@
 #  endif
 #endif
 
+/* some defaults if not provided above */
+#ifndef SCNdMAX
+#  define SCNdMAX "lld"
+#endif
+
 #endif /* __COMPAT_H__ */
 

Modified: icecast/trunk/icecast/src/format_theora.c
===================================================================
--- icecast/trunk/icecast/src/format_theora.c	2008-09-09 00:11:44 UTC (rev 15275)
+++ icecast/trunk/icecast/src/format_theora.c	2008-09-09 02:18:22 UTC (rev 15276)
@@ -124,12 +124,6 @@
     refbuf = make_refbuf_with_page (page);
     /* DEBUG3 ("refbuf %p has pageno %ld, %llu", refbuf, ogg_page_pageno (page), (uint64_t)granulepos); */
 
-    if (has_keyframe && codec->possible_start)
-    {
-        codec->possible_start->sync_point = 1;
-        refbuf_release (codec->possible_start);
-        codec->possible_start = NULL;
-    }
     if (granulepos != theora->prev_granulepos || granulepos == 0)
     {
         if (codec->possible_start)
@@ -138,6 +132,12 @@
         codec->possible_start = refbuf;
     }
     theora->prev_granulepos = granulepos;
+    if (has_keyframe && codec->possible_start)
+    {
+        codec->possible_start->sync_point = 1;
+        refbuf_release (codec->possible_start);
+        codec->possible_start = NULL;
+    }
 
     return refbuf;
 }

Modified: icecast/trunk/icecast/src/slave.c
===================================================================
--- icecast/trunk/icecast/src/slave.c	2008-09-09 00:11:44 UTC (rev 15275)
+++ icecast/trunk/icecast/src/slave.c	2008-09-09 02:18:22 UTC (rev 15276)
@@ -609,7 +609,7 @@
         on_demand = config->on_demand;
         ret = 1;
         config_release_config();
-        mastersock = sock_connect_wto (master, port, 0);
+        mastersock = sock_connect_wto (master, port, 10);
 
         if (mastersock == SOCK_ERROR)
         {

Modified: icecast/trunk/icecast/src/source.c
===================================================================
--- icecast/trunk/icecast/src/source.c	2008-09-09 00:11:44 UTC (rev 15275)
+++ icecast/trunk/icecast/src/source.c	2008-09-09 02:18:22 UTC (rev 15276)
@@ -1225,7 +1225,7 @@
     source_main (source);
 
     source_free_source (source);
-    slave_rebuild_mounts();
+    slave_update_all_mounts();
 
     return NULL;
 }



More information about the commits mailing list