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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Sat, Apr 24, 2004 at 03:29:57PM +0200, Andre Krause wrote:> 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 ?Vorbisfile only accidentally managed to make this work; having that jpg in the stream (unencapsulated) renders the file invalid, strictly speaking. Other vorbis decoders are very likely to reject it and it certainly won't work on any portable devices I'm aware of. Regardless... The behavior does make me curious as to why one worked and the other did not. I'll look at this. Neither should have been expected to work, but the fact I can't say why this happens might mean something more significant. Monty --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Andre, Sorry, I originally answered this mail before going back and scanning your previous messages. Is this using any callback tricks or trying to set up an 'unseekable' stream? <p>Monty --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Seemingly Similar Threads
- Streaming ogg from filepointer pointing to archive of many oggs. Ogg stream does not stop after end of one ogg file - what to do ?
- Songs stopping early on my player
- iaxmodem / hylafax receive problem
- Xapian::Database->close() for perl missing
- ov_read() returns OV_EINVAL (-131)