context->op.packetno= 0;
for(i=0; i<3; i++){ context->op.b_o_s= i==0; context->op.bytes= *(p++)<<8; context->op.bytes+=*(p++); context->op.packet= p; p += context->op.bytes;  if(vorbis_synthesis_headerin(&context->vi, &context->vc, &context->op)<0){ av_log(avccontext, AV_LOG_ERROR, "%d. vorbis header damaged\n", i+1); return -1; } } avccontext->channels = context->vi.channels; avccontext->sample_rate = context->vi.rate;  vorbis_synthesis_init(&context->vd, &context->vi); vorbis_block_init(&context->vd, &context->vb);
static int oggvorbis_decode_init(AVCodecContext *avccontext) {    OggVorbisContext *context = avccontext->priv_data ;    vorbis_info_init(&context->vi) ;    vorbis_comment_init(&context->vc) ;    context->op.packetno= 0;    return 0 ;}