[xiph-cvs] cvs commit: ices/src setup.c stream.c

Brendan brendan at xiph.org
Tue Jul 8 17:21:29 PDT 2003



brendan     03/07/08 20:21:29

  Modified:    src      setup.c stream.c
  Log:
  Silence some GCC 3.3 warnings (yes, safely).
  Minor cosmetics (empty playlist line is not an error, it just means stop)

Revision  Changes    Path
1.46      +5 -1      ices/src/setup.c

Index: setup.c
===================================================================
RCS file: /cvs/ice/ices/src/setup.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -p -u -r1.45 -r1.46
--- setup.c	4 Jul 2003 05:25:12 -0000	1.45
+++ setup.c	9 Jul 2003 00:21:29 -0000	1.46
@@ -1,7 +1,7 @@
 /* setup.c
  * - Functions for initialization in ices
  * Copyright (c) 2000 Alexander Haväng
- * Copyright (c) 2002-3 Brendan Cully <brendan at icecast.org>
+ * Copyright (c) 2002-3 Brendan Cully <brendan at xiph.org>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -49,6 +49,8 @@ ices_setup_initialize (void)
 {
   ices_stream_t* stream;
   
+  shout_init();
+
   /* Setup signal handlers */
   ices_signals_setup ();
 
@@ -114,6 +116,8 @@ ices_setup_shutdown (void)
   /* Close logfiles */
   ices_log_shutdown ();
         
+  shout_shutdown();
+
   /* Down and down we go... */
   exit (1);
 }

<p><p>1.58      +9 -13     ices/src/stream.c

Index: stream.c
===================================================================
RCS file: /cvs/ice/ices/src/stream.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -p -u -r1.57 -r1.58
--- stream.c	4 Jul 2003 17:58:16 -0000	1.57
+++ stream.c	9 Jul 2003 00:21:29 -0000	1.58
@@ -72,19 +72,13 @@ ices_stream_loop (ices_config_t* config)
   while (1) {
     source.path = ices_playlist_get_next ();
 
-    ices_cue_set_lineno (ices_playlist_get_current_lineno ());
-
-    /* We quit if the playlist handler gives us a NULL filename */
-    if (!source.path) {
-      ices_log ("Warning: ices_file_get_next() returned an error: %s", ices_log_get_error ());
-      ices_setup_shutdown ();
-    }
-
-    if (source.path[0] == '\0') {
+    if (!(source.path && source.path[0])) {
       ices_log ("Playlist file name is empty, shutting down.");
       ices_setup_shutdown ();
     }
 
+    ices_cue_set_lineno (ices_playlist_get_current_lineno ());
+
     ices_metadata_set (NULL, NULL);
     ices_metadata_set_file (source.path);
 
@@ -228,7 +222,7 @@ stream_send (ices_config_t* config, inpu
               rightp = left;
             else
               rightp = right;
-            if (obuf.len < 7200 + samples + samples / 4) {
+            if (obuf.len < (unsigned int) (7200 + samples + samples / 4)) {
               char *tmpbuf;
 
               /* pessimistic estimate from lame.h */
@@ -415,9 +409,11 @@ stream_connect (ices_stream_t* stream)
 }
 
 static int stream_needs_reencoding (input_stream_t* source, ices_stream_t* stream) {
-    if (!source->read || source->bitrate != stream->bitrate
-        || (stream->out_samplerate > 0 && source->samplerate != stream->out_samplerate)
-        || (stream->out_numchannels > 0 && source->channels != stream->out_numchannels))
+    if (!source->read || source->bitrate != (unsigned int)stream->bitrate
+        || (stream->out_samplerate > 0 &&
+	    source->samplerate != (unsigned int)stream->out_samplerate)
+        || (stream->out_numchannels > 0 &&
+	    source->channels != (unsigned int)stream->out_numchannels))
       return 1;
 
   return 0;

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list