l = 0 ;
static int oggvorbis_encode_frame(AVCodecContext *avccontext,				  unsigned char *packets,			   int buf_size, void *data){    OggVorbisContext *context = avccontext->priv_data ;    float **buffer ;    ogg_packet op ;    signed char *audio = data ;    int l, samples = OGGVORBIS_FRAME_SIZE ;    buffer = vorbis_analysis_buffer(&context->vd, samples) ;    if(context->vi.channels == 1) {	for(l = 0 ; l < samples ; l++)	    buffer[0][l]=((audio[l*2+1]<<8)|(0x00ff&(int)audio[l*2]))/32768.f;    } else {	for(l = 0 ; l < samples ; l++){	    buffer[0][l]=((audio[l*4+1]<<8)|(0x00ff&(int)audio[l*4]))/32768.f;	    buffer[1][l]=((audio[l*4+3]<<8)|(0x00ff&(int)audio[l*4+2]))/32768.f;	}    }        vorbis_analysis_wrote(&context->vd, samples) ;     l = 0 ;    while(vorbis_analysis_blockout(&context->vd, &context->vb) == 1) {	vorbis_analysis(&context->vb, NULL);	vorbis_bitrate_addblock(&context->vb) ;	while(vorbis_bitrate_flushpacket(&context->vd, &op)) {	    memcpy(packets + l, &op, sizeof(ogg_packet)) ;	    memcpy(packets + l + sizeof(ogg_packet), op.packet, op.bytes) ;	    l += sizeof(ogg_packet) + op.bytes ;	}    }    return l ;}