********************************************************************
function: libvorbis codec headers
- last mod: $Id: codec.h,v 1.10 2000/02/16 22:34:43 xiphmont Exp $
+ last mod: $Id: codec.h,v 1.11 2000/04/03 09:45:55 xiphmont Exp $
********************************************************************/
extern int ogg_stream_init(ogg_stream_state *os,int serialno);
extern int ogg_stream_clear(ogg_stream_state *os);
-extern int ogg_stream_reset(ogg_stream_state *os,long expected_pageno);
+extern int ogg_stream_reset(ogg_stream_state *os);
extern int ogg_stream_destroy(ogg_stream_state *os);
extern int ogg_stream_eof(ogg_stream_state *os);
function: code raw [Vorbis] packets into framed OggSquish stream and
decode Ogg streams back into raw packets
- last mod: $Id: framing.c,v 1.15 2000/03/10 13:21:18 xiphmont Exp $
+ last mod: $Id: framing.c,v 1.16 2000/04/03 09:45:55 xiphmont Exp $
note: The CRC code is directly derived from public domain code by
Ross Williams (ross@guest.adelaide.edu.au). See docs/framing.html
os->lacing_fill=os->lacing_packet;
/* make a note of dropped data in segment table */
- os->lacing_vals[os->lacing_fill++]=0x400;
- os->lacing_packet++;
+ if(os->pageno!=-1){
+ os->lacing_vals[os->lacing_fill++]=0x400;
+ os->lacing_packet++;
+ }
/* are we a 'continued packet' page? If so, we'll need to skip
some segments */
return(0);
}
-int ogg_stream_reset(ogg_stream_state *os,long expected_pageno){
+int ogg_stream_reset(ogg_stream_state *os){
os->body_fill=0;
os->body_returned=0;
os->e_o_s=0;
os->b_o_s=0;
- os->pageno=expected_pageno;
+ os->pageno=-1;
os->packetno=0;
os->pcmpos=0;
********************************************************************
function: residue backend 0 implementation
- last mod: $Id: res0.c,v 1.8 2000/02/23 11:22:46 xiphmont Exp $
+ last mod: $Id: res0.c,v 1.9 2000/04/03 09:45:55 xiphmont Exp $
********************************************************************/
for(i=info->begin,l=0;i<info->end;){
/* fetch the partition word for each channel */
- for(j=0;j<ch;j++)
- partword[j]=look->decodemap[vorbis_book_decode(look->phrasebook,
- &vb->opb)];
+ for(j=0;j<ch;j++){
+ int temp=vorbis_book_decode(look->phrasebook,&vb->opb);
+ partword[j]=look->decodemap[temp];
+ if(partword[j]==NULL)exit(1);
+ }
/* now we decode interleaved residual values for the partitions */
for(k=0;k<partitions_per_word;k++,l++,i+=samples_per_partition)
********************************************************************
function: stdio-based convenience library for opening/seeking/decoding
- last mod: $Id: vorbisfile.c,v 1.18 2000/04/03 08:30:49 xiphmont Exp $
+ last mod: $Id: vorbisfile.c,v 1.19 2000/04/03 09:45:55 xiphmont Exp $
********************************************************************/
vf->current_link=link;
ogg_stream_init(&vf->os,vf->current_serialno);
- ogg_stream_reset(&vf->os,ogg_page_pageno(&og));
+ ogg_stream_reset(&vf->os);
}else{
/* we're streaming */