aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/oggvorbis.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-12-09 12:03:43 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-12-09 12:03:43 +0000
commit492cd3a9203779380cea24f23190b92af2b48007 (patch)
tree4a673a16c3e2c0ac4dc28a10ae2d5f6b6a32fda4 /libavcodec/oggvorbis.c
parentf694168d524d1c84f5f20f4260fcab1f4d8c11d7 (diff)
downloadffmpeg-492cd3a9203779380cea24f23190b92af2b48007.tar.gz
AVVideoFrame -> AVFrame
Originally committed as revision 1327 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/oggvorbis.c')
-rw-r--r--libavcodec/oggvorbis.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavcodec/oggvorbis.c b/libavcodec/oggvorbis.c
index 1d046a3bb2..e327e2fd3e 100644
--- a/libavcodec/oggvorbis.c
+++ b/libavcodec/oggvorbis.c
@@ -24,9 +24,9 @@ typedef struct OggVorbisContext {
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 @@ static int oggvorbis_encode_init(AVCodecContext *avccontext) {
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 @@ static int oggvorbis_encode_close(AVCodecContext *avccontext) {
vorbis_block_clear(&context->vb);
vorbis_dsp_clear(&context->vd);
vorbis_info_clear(&context->vi);
+
+ av_freep(&avccontext->coded_frame);
return 0 ;
}