Mercurial > libavcodec.hg
diff oggvorbis.c @ 925:7fccaa0d699d libavcodec
AVVideoFrame -> AVFrame
author | michaelni |
---|---|
date | Mon, 09 Dec 2002 12:03:43 +0000 |
parents | b0d29bf1cecd |
children | 159333d9297e |
line wrap: on
line diff
--- a/oggvorbis.c Mon Dec 09 00:29:17 2002 +0000 +++ b/oggvorbis.c Mon Dec 09 12:03:43 2002 +0000 @@ -24,9 +24,9 @@ int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avccontext) { - if(avccontext->quality) /* VBR requested */ + if(avccontext->coded_frame->quality) /* VBR requested */ return vorbis_encode_init_vbr(vi, avccontext->channels, - avccontext->sample_rate, (float)avccontext->quality / 1000) ; + avccontext->sample_rate, (float)avccontext->coded_frame->quality / 1000) ; return vorbis_encode_init(vi, avccontext->channels, avccontext->sample_rate, -1, avccontext->bit_rate, -1) ; @@ -45,6 +45,9 @@ vorbis_block_init(&context->vd, &context->vb) ; avccontext->frame_size = OGGVORBIS_FRAME_SIZE ; + + avccontext->coded_frame= avcodec_alloc_frame(); + avccontext->coded_frame->key_frame= 1; return 0 ; } @@ -113,6 +116,8 @@ vorbis_block_clear(&context->vb); vorbis_dsp_clear(&context->vd); vorbis_info_clear(&context->vi); + + av_freep(&avccontext->coded_frame); return 0 ; }