[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#203087: marked as done (icecast-client: shout won't read from devices (e.g. stdin))



Your message dated Wed, 22 Mar 2006 15:16:14 +0100
with message-id <877j6mo98x.fsf@diziet.irb.hr>
and subject line Removed
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: icecast-client
Version: 1.4.0-4.1
Severity: normal
Tags: patch

shout won't read from stdin, which is quite useful when streaming from
toolame or other encoder.

There is no direct option for reading from stdin, but you can pass in
/dev/stdin.  However, because shout uses the file size to work out where
the id3 tag might be, this fails.

Enclosed is a patch to detect devices and enter a "stream" mode where
the file size is not checked.

It also fixes two other bugs:

* if a non-fatal error occurs in read (e.g. EAGAIN) then it is mistakenly
  treated as an error.

* there is a double-close when the file is played too quickly (e.g.
  no bytes) causing a segmentation fault.  The fix is to add a return
  after the closes.

--- shout.c.dist        Sun Jul 27 17:55:11 2003
+++ shout.c     Sun Jul 27 18:21:49 2003
@@ -1154,6 +1154,7 @@
        my_long_t deltasleep = 0, start = 0, t = 0, mtv = 0;
        char *buf;
        struct stat st;
+       int stream = 0;
        int tmp=0;
 
        /* Clean the filename from \n */
@@ -1182,8 +1183,10 @@
                return;
        }
 #ifndef _WIN32
-       if (S_ISFIFO (st.st_mode)) {
+       if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode) ||
+           S_ISFIFO(st.st_mode)) {
                set.graphics = 0;
+               stream = 1;
        }
 #endif /* !win32 */
 
@@ -1316,7 +1319,7 @@
                                return;
                        }
                        /* The last 128 bytes _MIGHT_ be a id3 tag */
-                       if ((bytes + n) > (st.st_size - 128)) {
+                       if (!stream && (bytes + n) > (st.st_size - 128)) {
                                char *id3start;
                                int newreads = 0;
 
@@ -1363,7 +1366,7 @@
                                        mtv = my_get_time ();
                                }
                        }
-                       if (n <= 0) {   /* End of file */
+                       if (n == 0) {   /* End of file */
                                my_long_t time_sent;
                                double avg;
 
@@ -1376,6 +1379,7 @@
                                if (!rate || !time_sent) {
                                        nfree (buf);
                                        close (fd);
+                                       return;
                                }
 #ifdef HAVE_LONG_LONG
                                scream (NORMAL,


-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux stormy 2.4.20-bf2.4 #1 Wed Dec 25 13:17:08 UTC 2002 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages icecast-client depends on:
ii  libc6                         2.2.5-11.5 GNU C Library: Shared libraries an



--- End Message ---
--- Begin Message ---
icecast-client has been removed from Debian.  For more information,
please see <http://bugs.debian.org/279526>.

--- End Message ---

Reply to: