I am a game developer, and we used RC3 in our last game. Worked great. I'm trying to update to 1.0 now, and running into some problems. Specifically, I think a change to _get_prev_page() in vorbisfile.c broke the decoder for very small files. I have a file called "silence" that's just a silent wav file. It compresses down to barely more than the header, so it's _really_ small. When I try to play it, it goes into an infinite loop in vorbisfile.c, line 159. In RC3, that code was: while(offset==-1){ begin-=CHUNKSIZE; if(begin<0) begin=0; _seek_helper(vf,begin); while(vf->offset<begin+CHUNKSIZE){ ret=_get_next_page(vf,og,begin+CHUNKSIZE-vf->offset); if(ret==OV_EREAD)return(OV_EREAD); if(ret<0){ break; }else{ offset=ret; } } } In 1.0, it changed to: end = begin; while(offset==-1){ begin-=CHUNKSIZE; if(begin<0) begin=0; _seek_helper(vf,begin); while(vf->offset<end){ ret=_get_next_page(vf,og,end-vf->offset); if(ret==OV_EREAD)return(OV_EREAD); if(ret<0){ break; }else{ offset=ret; } } } I don't know why that change was made, but it breaks the decoder for me. I'm not exactly sure what is wrong with the new code (I mean, I can think of a situation where they behave differently, but I'm too lazy to trace through all the implications). Replacing the 1.0 loop with the RC3 loop made the problem go away for me. Anybody have a good explanation of why that change was made, and why it shouldn't be set back to the way it was before? -Marc --- >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-dev-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.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2002-11-12 at 23:03:56 Marc Templin wrote: MT> Specifically, I think a change to _get_prev_page() in vorbisfile.c broke MT> the decoder for very small files. I have a file called "silence" that's MT> just a silent wav file. It compresses down to barely more than the MT> header, so it's _really_ small. When I try to play it, it goes into an MT> infinite loop in vorbisfile.c, line 159. I think I encountered the same problem before: http://www.xiph.org/archives/vorbis-dev/200108/0243.html And some time after that, Monty answered: http://www.xiph.org/archives/vorbis-dev/200109/0036.html Brian Hook else simply used wav files for the very short sound fragments, since the gain from using Ogg is not much in that case anyway: http://www.xiph.org/archives/vorbis-dev/200112/0080.html I've just tried to reproduce the problem with the 1.0 release vorbisfile code, and some extremely short or even empty wav files, compressed to ogg. It seems to work properly here... Maybe this is because you are using ogg files encoded with a different encoder? Please upload an ogg file somewhere, that causes such an infinite loop on your machine, and post the url here. Cheers, - -- Dimitry Andric <dim@xs4all.nl> PGP Key: http://www.xs4all.nl/~dim/dim.asc Fingerprint: 7AB462D2CE35FC6D42394FCDB05EA30A2E2096A3 Lbh ner abj va ivbyngvba bs gur QZPN -----BEGIN PGP SIGNATURE----- Version: 6.5.8ckt http://www.ipgpp.com/ Comment: http://duncan.gn.apc.org/stoa_cover.htm iQA/AwUBPdF7SbBeowouIJajEQKV6QCfXWTBsyiA2YpUM/273e435gtrZMsAoL0l 2S2DqbfPRwzSLe7VBNhbFwTy =D98p -----END PGP SIGNATURE----- --- >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-dev-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.
>I don't know why that change was made, but it breaks the decoder for me. >I'm not exactly sure what is wrong with the new code (I mean, I can think >of a situation where they behave differently, but I'm too lazy to trace >through all the implications). Replacing the 1.0 loop with the RC3 loop >made the problem go away for me. > >Anybody have a good explanation of why that change was made, and why it >shouldn't be set back to the way it was before?<p>The precise reason for this change I don't recall - but there were plenty of fixes between rc3 and 1.0, this probably fixed a different case that you're not encountering. I _think_, but I'm not sure, that the problem you're seeing has been fixed (in cvs) - can you try that and get back to us? Michael <p>--- >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-dev-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.