[xiph-commits] r7424 - icecast/trunk/ices0/src

brendan at motherfish-iii.xiph.org brendan
Thu Aug 5 19:04:28 PDT 2004


Author: brendan
Date: Thu Aug  5 19:04:28 2004
New Revision: 7424

Modified:
icecast/trunk/ices0/src/stream.c
Log:
Don't flush MP3 buffer at the end of a track when crossfading, it sometimes
introduces a small stutter and it doesn't really do anything helpful anyway.


Modified: icecast/trunk/ices0/src/stream.c
===================================================================
--- icecast/trunk/ices0/src/stream.c	2004-07-30 22:38:09 UTC (rev 7423)
+++ icecast/trunk/ices0/src/stream.c	2004-07-30 22:39:08 UTC (rev 7424)
@@ -26,6 +26,9 @@
#ifdef HAVE_LIBVORBISFILE
#include "in_vorbis.h"
#endif
+#ifdef HAVE_LIBFAAD
+#include "in_mp4.h"
+#endif

#ifdef TIME_WITH_SYS_TIME
#  include <sys/time.h>
@@ -293,12 +296,13 @@
}

#ifdef HAVE_LIBLAME
-  for (stream = config->streams; stream; stream = stream->next)
-    if (stream->reencode && stream_needs_reencoding (source, stream)) {
-      len = ices_reencode_flush (stream, obuf.data, obuf.len);
-      if (len > 0)
-        rc = stream_send_data (stream, obuf.data, len);
-    }
+  if (!config->plugins) /* flush is only necessary if we're not continuously reencoding */
+    for (stream = config->streams; stream; stream = stream->next)
+      if (stream->reencode && stream_needs_reencoding (source, stream)) {
+	len = ices_reencode_flush (stream, obuf.data, obuf.len);
+	if (len > 0)
+	  rc = stream_send_data (stream, obuf.data, len);
+      }

if (obuf.data)
free(obuf.data);



More information about the commits mailing list