summaryrefslogtreecommitdiff
path: root/libavcodec/mp3lameaudio.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-12-09 14:33:20 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-12-09 14:33:20 +0000
commitbefaced573f0df0b6d5044822102cc0f2d013c6a (patch)
tree6e60e4f186287e8fa997665755b6ea28e527ddf9 /libavcodec/mp3lameaudio.c
parent492cd3a9203779380cea24f23190b92af2b48007 (diff)
100l
Originally committed as revision 1328 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mp3lameaudio.c')
-rw-r--r--libavcodec/mp3lameaudio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/mp3lameaudio.c b/libavcodec/mp3lameaudio.c
index a047e1a19e..18f36e1a39 100644
--- a/libavcodec/mp3lameaudio.c
+++ b/libavcodec/mp3lameaudio.c
@@ -50,7 +50,9 @@ static int MP3lame_encode_init(AVCodecContext *avctx)
goto err_close;
avctx->frame_size = MPA_FRAME_SIZE;
- avctx->key_frame = 1;
+
+ avctx->coded_frame= avcodec_alloc_frame();
+ avctx->coded_frame->key_frame= 1;
return 0;
@@ -81,6 +83,8 @@ int MP3lame_encode_frame(AVCodecContext *avctx,
int MP3lame_encode_close(AVCodecContext *avctx)
{
Mp3AudioContext *s = avctx->priv_data;
+
+ av_freep(&avctx->coded_frame);
lame_close(s->gfp);
return 0;