From 492cd3a9203779380cea24f23190b92af2b48007 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 9 Dec 2002 12:03:43 +0000 Subject: AVVideoFrame -> AVFrame Originally committed as revision 1327 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/pcm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libavcodec/pcm.c') diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index 245afdea4e..811264b550 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -128,11 +128,17 @@ static int pcm_encode_init(AVCodecContext *avctx) default: break; } + + avctx->coded_frame= avcodec_alloc_frame(); + avctx->coded_frame->key_frame= 1; + return 0; } static int pcm_encode_close(AVCodecContext *avctx) { + av_freep(&avctx->coded_frame); + switch(avctx->codec->id) { case CODEC_ID_PCM_ALAW: if (--linear_to_alaw_ref == 0) @@ -237,7 +243,6 @@ static int pcm_encode_frame(AVCodecContext *avctx, default: return -1; } - avctx->key_frame = 1; //avctx->frame_size = (dst - frame) / (sample_size * avctx->channels); return dst - frame; -- cgit v1.2.3