vorbis_block vb ;
uint8_t buffer[BUFFER_SIZE];
int buffer_index;
+ int eof;
/* decoder */
vorbis_comment vc ;
int buf_size, void *data)
{
OggVorbisContext *context = avccontext->priv_data ;
- float **buffer ;
ogg_packet op ;
signed short *audio = data ;
- int l, samples = data ? OGGVORBIS_FRAME_SIZE : 0;
+ int l;
+
+ if(data) {
+ int samples = OGGVORBIS_FRAME_SIZE;
+ float **buffer ;
buffer = vorbis_analysis_buffer(&context->vd, samples) ;
}
vorbis_analysis_wrote(&context->vd, samples) ;
+ } else {
+ if(!context->eof)
+ vorbis_analysis_wrote(&context->vd, 0) ;
+ context->eof = 1;
+ }
while(vorbis_analysis_blockout(&context->vd, &context->vb) == 1) {
vorbis_analysis(&context->vb, NULL);