improved fix for misleading warning, now error out for id3v2 tag (SF#1631064: http://sourceforge.net/tracker/index.php?func=detail&aid=1631064&group_id=13478&atid=113478)
diff --git a/src/flac/main.c b/src/flac/main.c
index 99c596f..a833c7c 100644
--- a/src/flac/main.c
+++ b/src/flac/main.c
@@ -1503,7 +1503,7 @@
 {
 	/* WATCHOUT: indexed by FileFormat */
 	static const char * const ff[] = { "raw", "WAVE", "AIFF", "FLAC", "Ogg FLAC" };
-	flac__utils_printf(stderr, 1, "WARNING: %s is not a %s file%s; treating as a %s file\n", infilename, ff[wrong], wrong==FLAC||wrong==OGGFLAC? " (or may have an ID3v2 tag which is not allowed)":"", ff[right]);
+	flac__utils_printf(stderr, 1, "WARNING: %s is not a %s file; treating as a %s file\n", infilename, ff[wrong], ff[right]);
 }
 
 int encode_file(const char *infilename, FLAC__bool is_first_file, FLAC__bool is_last_file)
@@ -1557,7 +1557,11 @@
 			fmt= RAW;
 		}
 		else {
-			if(!strncmp((const char *)lookahead, "RIFF", 4) && !strncmp((const char *)lookahead+8, "WAVE", 4))
+			if(!strncmp((const char *)lookahead, "ID3", 3)) {
+				flac__utils_printf(stderr, 1, "ERROR: input file %s has an ID3v2 tag\n", infilename);
+				return 1;
+			}
+			else if(!strncmp((const char *)lookahead, "RIFF", 4) && !strncmp((const char *)lookahead+8, "WAVE", 4))
 				fmt= WAV;
 			else if(!strncmp((const char *)lookahead, "FORM", 4) && !strncmp((const char *)lookahead+8, "AIFF", 4))
 				fmt= AIF;