changeset 2988:059285b5de7c

Make the MP3 validation checks less restrictive with shoutcast streams.
author William Pitcock <nenolod@atheme.org>
date Fri, 05 Dec 2008 07:11:37 -0600
parents 58c63fbbd3ce
children 323138ecc070
files src/madplug/plugin.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/madplug/plugin.c	Fri Dec 05 07:10:58 2008 -0600
+++ b/src/madplug/plugin.c	Fri Dec 05 07:11:37 2008 -0600
@@ -277,8 +277,8 @@
         ((guint32) hbuf[3]);
 }
 
-#undef MADPROBE_DEBUG
-//#define MADPROBE_DEBUG
+//#undef MADPROBE_DEBUG
+#define MADPROBE_DEBUG
 
 #ifdef MADPROBE_DEBUG
 static gchar *mp3_ver_table[4] = { "2.5", "INVALID", "2", "1" };
@@ -401,7 +401,7 @@
                         /* Not similar frame... */
                         LOL(" .. but does not match (%d)!\n", chkcount);
                         state = STATE_RESYNC;
-                    } else if (chkcount >= 3) {
+                    } else if (chkcount >= info.remote ? 2 : 3) {
                         /* Okay, accept this stream */
                         LOL(" .. accepted as mp3!!!\n");
                         return 1;