summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc.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/ac3enc.c
parentf694168d524d1c84f5f20f4260fcab1f4d8c11d7 (diff)
AVVideoFrame -> AVFrame
Originally committed as revision 1327 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3enc.c')
-rw-r--r--libavcodec/ac3enc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index fbd68210ad..641e919a6b 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -826,7 +826,6 @@ static int AC3_encode_init(AVCodecContext *avctx)
};
avctx->frame_size = AC3_FRAME_SIZE;
- avctx->key_frame = 1; /* always key frame */
/* number of channels */
if (channels < 1 || channels > 6)
@@ -890,6 +889,9 @@ static int AC3_encode_init(AVCodecContext *avctx)
}
ac3_crc_init();
+
+ avctx->coded_frame= avcodec_alloc_frame();
+ avctx->coded_frame->key_frame= 1;
return 0;
}
@@ -1447,6 +1449,11 @@ static int AC3_encode_frame(AVCodecContext *avctx,
return output_frame_end(s);
}
+static int AC3_encode_close(AVCodecContext *avctx)
+{
+ av_freep(&avctx->coded_frame);
+}
+
#if 0
/*************************************************************************/
/* TEST */
@@ -1546,5 +1553,6 @@ AVCodec ac3_encoder = {
sizeof(AC3EncodeContext),
AC3_encode_init,
AC3_encode_frame,
+ AC3_encode_close,
NULL,
};