[Tremor] Bug in vorbisfile.c

Gilles Boccon-Gibod bok at bok.net
Sun Jun 1 18:00:33 PDT 2008


There seems to be a bug in vorbisfile.c that gets triggered when  
streaming an ogg/vorbis file with a discontinuity (like, for example,  
when playing an online radio station).
The problem occurs in the function _fetch_and_process_packet  
(vorbisfile.c), line 649. After a discontinuity, the stream data  
structure becomes NULL, so the call to ogg_stream_pagein(vf->os,&og)  
crashes.
I am not familiar with the internals of the library, so the simple  
solution I have take is just to add a check before calling the  
function. This seems to work:

     if (og.header) { /* added this to avoid crash on streaming  
boundaries */
         ogg_stream_pagein(vf->os,&og);
     }

If someone familiar with the code could check this, and maybe make the  
fix in the source control master repository, that would be great.

(I also have a few other minor patches that are useful to remove some  
compiler warnings, but they don't change the code logic at all. I'd  
like to submit those for inclusion in the source tree as well if  
possible).

-- Gilles


More information about the Tremor mailing list