On Thu, 6 Jul 2000, Ralph Giles wrote:
> Oops, on further investigation those 128 bytes are an id3 tag, so we
> need an interlock of some sort. I'll take a look at this later.
The attached patch should protect against id3 tags in ogg files. I now get
a zero-length output file.
-r
--
[EMAIL PROTECTED]
This user has not set up a .signature file.
Index: main.c
===================================================================
RCS file: /cvsroot/lame/lame/main.c,v
retrieving revision 1.52
diff -u -r1.52 main.c
--- main.c 2000/07/04 03:28:43 1.52
+++ main.c 2000/07/07 08:09:26
@@ -128,7 +128,15 @@
} else {
- lame_id3v2_tag(&gf,outf); /* add ID3 version 2 tag to mp3 file */
+ /* add ID3 version 2 tag to mp3 file */
+#ifdef HAVEVORBIS
+ /* no id3 tags on ogg files! */
+ if (!gf.ogg) {
+ lame_id3v2_tag(&gf,outf);
+ }
+#else
+ lame_id3v2_tag(&gf,outf);
+#endif
/* encode until we hit eof */
do {
@@ -162,11 +170,18 @@
/* imp3 is not negative, but fwrite needs an unsigned here */
fwrite(mp3buffer,1,(unsigned int)imp3,outf);
fclose(outf);
- lame_mp3_tags(&gf); /* add ID3 version 1 or VBR tags to mp3 file */
+
+/* add ID3 version 1 or VBR tags to mp3 file */
+#ifdef HAVEVORBIS
+ /* we don't want id3 tags on ogg files */
+ if (!gf.ogg) {
+ lame_mp3_tags(&gf);
+ }
+#else
+ lame_mp3_tags(&gf);
+#endif
+
}
lame_close_infile(&gf); /* close the input file */
return 0;
}
-
-
-