summaryrefslogtreecommitdiff
path: root/libavcodec/pcm.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/pcm.c
parentf694168d524d1c84f5f20f4260fcab1f4d8c11d7 (diff)
AVVideoFrame -> AVFrame
Originally committed as revision 1327 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/pcm.c')
-rw-r--r--libavcodec/pcm.c7
1 files changed, 6 insertions, 1 deletions
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;