[vorbis] Is this a bug in ogg ?
Andre Krause
post at andre-krause.net
Sat Apr 24 06:29:57 PDT 2004
I have a problem i suspect to be a bug in ogg:
Assume i have a simple archive "chou_s_test1_test2.pak", created by simply
concatenating binary files together:
chou_s.jpg (3403 bytes)
test1.ogg (5196 bytes)
test2.ogg (6128 bytes)
If i place the a filepointer passed to ov_open to the beginning of
test1.ogg, this ogg gets opened and decoded correctly. But if i place it to
the beginning of test2.ogg, ov_open returns error code -123 (OV_EBADLINK ).
Any idea ?
Here is the source code i encounter the problem with:
( you can download a zip file with the ogg files i used here:
http://www.videofiles.de/ogg_bug.zip )
<p>#include<stdio.h>
#include <vorbis/vorbisfile.h>
int main(int argc, char *argv[])
{
OggVorbis_File vf;
FILE *fp=NULL;
// chou_s_test1_test2.pak is created by simply concatenating
chou_s.jpg (3403 bytes), test1.ogg (5196 bytes) and test2.ogg (6128 bytes)
fp=fopen("chou_s_test1_test2.pak","rb");
//fseek(fp,3403, SEEK_SET); // place to the beginning of test1.ogg
fseek(fp,3403 + 5196,SEEK_SET); // place to the beginning of
test2.ogg
fprintf(stderr, " ov_open_return_code:%i\n",ov_open(fp, &vf, NULL,
0));
int xx = ov_raw_total(&vf,-1);
int yy = (long)ov_pcm_total(&vf, -1);
printf("oggtotalraw:%i",xx);
printf("oggtotalpcm:%i",yy);
}
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis
mailing list