[xiph-commits] r14484 - trunk/vorbis-tools/oggenc
imalone at svn.xiph.org
imalone at svn.xiph.org
Mon Feb 11 23:56:49 PST 2008
Author: imalone
Date: 2008-02-11 23:56:48 -0800 (Mon, 11 Feb 2008)
New Revision: 14484
Modified:
trunk/vorbis-tools/oggenc/audio.c
trunk/vorbis-tools/oggenc/flac.c
Log:
Fix oggenc test for FLAC: need 33 bytes
Modified: trunk/vorbis-tools/oggenc/audio.c
===================================================================
--- trunk/vorbis-tools/oggenc/audio.c 2008-02-12 04:15:45 UTC (rev 14483)
+++ trunk/vorbis-tools/oggenc/audio.c 2008-02-12 07:56:48 UTC (rev 14484)
@@ -48,7 +48,7 @@
{aiff_id, 12, aiff_open, wav_close, "aiff", N_("AIFF/AIFC file reader")},
#ifdef HAVE_LIBFLAC
{flac_id, 4, flac_open, flac_close, "flac", N_("FLAC file reader")},
- {oggflac_id, 32, flac_open, flac_close, "ogg", N_("Ogg FLAC file reader")},
+ {oggflac_id, 33, flac_open, flac_close, "ogg", N_("Ogg FLAC file reader")},
#endif
{NULL, 0, NULL, NULL, NULL, NULL}
};
Modified: trunk/vorbis-tools/oggenc/flac.c
===================================================================
--- trunk/vorbis-tools/oggenc/flac.c 2008-02-12 04:15:45 UTC (rev 14483)
+++ trunk/vorbis-tools/oggenc/flac.c 2008-02-12 07:56:48 UTC (rev 14484)
@@ -54,10 +54,10 @@
int oggflac_id(unsigned char *buf, int len)
{
- if (len < 32) return 0;
+ if (len < 33) return 0;
return memcmp(buf, "OggS", 4) == 0 &&
- (memcmp (buf+28, "\177FLAC", 5) || flac_id(buf+28, len - 28));
+ (memcmp (buf+28, "\177FLAC", 5) == 0 || flac_id(buf+28, len - 28));
}
More information about the commits
mailing list