vorbis.m4 check fails with segfault
(This bug is against 1.0 which does not yet have a bugzilla tag.)
In the vorbis 1.0 debian packages the check code in vorbis.m4 fails with a segfault.
Program received signal SIGSEGV, Segmentation fault.
0x4002bad6 in vorbis_block_clear () from /usr/lib/libvorbis.so.0
(gdb) bt
#0 0x4002bad6 in vorbis_block_clear () from /usr/lib/libvorbis.so.0
#1 0x4002ce9b in vorbis_analysis_init () from /usr/lib/libvorbis.so.0
#2 0x080486c6 in main () at t.c:17
The following fixes the segfault but perhaps better return value checking should
be used since this is mainly just a link test vs a functional test:
diff -u -r1.2 vorbis.m4
--- vorbis.m4 13 Jul 2002 02:16:53 -0000 1.2
+++ vorbis.m4 29 Jul 2002 14:36:43 -0000
@@ -54,6 +54,7 @@
#include <stdlib.h>
#include <string.h>
#include <vorbis/codec.h>
+#include <vorbis/vorbisenc.h>
int main ()
{
@@ -62,7 +63,7 @@
vorbis_info vi;
vorbis_info_init (&vi);
- vorbis_encode_init (&vi, 2, 44100, -1, 128, -1);
+ vorbis_encode_init (&vi, 2, 44100, -1, 128000, -1);
vorbis_analysis_init (&vd, &vi);
vorbis_block_init (&vd, &vb);
/* this function was added in 1.0rc3, so this is what we're testing for */