changeset 534:c00fd2a0736f trunk

[svn] - support ice-name: icecast2 header
author nenolod
date Tue, 23 Jan 2007 04:31:53 -0800
parents 2fa253251598
children 471da4165100
files ChangeLog src/curl/curl.c
diffstat 2 files changed, 22 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jan 23 04:14:48 2007 -0800
+++ b/ChangeLog	Tue Jan 23 04:31:53 2007 -0800
@@ -1,3 +1,11 @@
+2007-01-23 12:14:48 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1152]
+  - fix uninitialized value conditional jump, maybe it will help
+  
+  trunk/src/vorbis/vorbis.c |   22 ++++++++++++----------
+  1 file changed, 12 insertions(+), 10 deletions(-)
+
+
 2007-01-23 11:00:28 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [1150]
   - if the performer of a track is not specified in cue sheet, the performer of the album will be used.
--- a/src/curl/curl.c	Tue Jan 23 04:14:48 2007 -0800
+++ b/src/curl/curl.c	Tue Jan 23 04:31:53 2007 -0800
@@ -151,6 +151,7 @@
 
 #define PROBE 262140
 
+#define ICE_NAME "ice-name:"
 #define ICY_NAME "icy-name:"
 #define ICY_METAINT "icy-metaint:"
 
@@ -183,6 +184,14 @@
 	  g_print("Stream name: %s\n", handle->name);
 	}
     }
+  if (match_header(handle, size, ICE_NAME))
+    {
+      handle->name = get_value(handle, size, ICE_NAME);
+      if (DEBUG_HEADERS)
+	{
+	  g_print("Stream name: %s\n", handle->name);
+	}
+    }
   if (match_header(handle, size, ICY_METAINT))
     {
       gchar *value = get_value(handle, size, ICY_METAINT);
@@ -272,7 +281,7 @@
       while (!(trans = buf_space(handle)) && !handle->cancel)
 	{
 	  g_usleep(10000);
-	  //g_print("Wait for free space\n");
+	  g_print("Wait for free space\n");
 	}
       if (handle->cancel)
 	break;
@@ -577,7 +586,7 @@
   if (sz < 0)
     return 0;
 
-  //g_print("Reading %d*%d=%d from %p\n", size, nmemb, sz, handle);
+//  g_print("Reading %d*%d=%d from %p\n", size, nmemb, sz, handle);
 
   /* check if there are ungetted chars that should be picked before the real fread */
   if ( handle->stream_stack != NULL )
@@ -598,6 +607,8 @@
   if (DEBUG_SEEK)
     check(handle);
 
+  memset(ptr, '\0', sz);
+
   while (ret < sz)
     {
       size_t available;
@@ -624,7 +635,7 @@
 	}
     }
 
-  //g_print("Read %d from %p\n", ret, handle);
+//  g_print("Read %d from %p\n", ret, handle);
 
   return ret;
 }