[xiph-commits] r14009 - trunk/ezstream/src

moritz at svn.xiph.org moritz at svn.xiph.org
Thu Oct 18 00:39:19 PDT 2007


Author: moritz
Date: 2007-10-18 00:39:18 -0700 (Thu, 18 Oct 2007)
New Revision: 14009

Modified:
   trunk/ezstream/src/ezstream.c
Log:
Improve output messages some more when dealing with standard input.


Modified: trunk/ezstream/src/ezstream.c
===================================================================
--- trunk/ezstream/src/ezstream.c	2007-10-18 06:38:51 UTC (rev 14008)
+++ trunk/ezstream/src/ezstream.c	2007-10-18 07:39:18 UTC (rev 14009)
@@ -578,9 +578,6 @@
 				metadata_free(&mdata);
 		}
 
-		if (vFlag)
-			printf("%s: Reading from standard input\n",
-			       __progname);
 		if (isStdin != NULL)
 			*isStdin = 1;
 #ifdef WIN32
@@ -889,7 +886,8 @@
 		char	*tmp, *metaData;
 
 		tmp = metadata_assemble_string(mdata);
-		metaData = UTF8toCHAR(tmp, ICONV_REPLACE);
+		if ((metaData = UTF8toCHAR(tmp, ICONV_REPLACE)) == NULL)
+			metaData = xstrdup("(unknown title)");
 		xfree(tmp);
 		printf("%s: Streaming ``%s''", __progname, metaData);
 		if (vFlag)
@@ -903,7 +901,8 @@
 			setMetadata(shout, mdata, NULL);
 
 		metadata_free(&mdata);
-	}
+	} else if (isStdin)
+		printf("%s: Streaming from standard input\n", __progname);
 
 	if (songLen > 0)
 		songLenStr = xstrdup(getTimeString(songLen));



More information about the commits mailing list