Mercurial > libavcodec.hg
diff ac3enc.c @ 925:7fccaa0d699d libavcodec
AVVideoFrame -> AVFrame
author | michaelni |
---|---|
date | Mon, 09 Dec 2002 12:03:43 +0000 |
parents | dd7d5748d064 |
children | 48349e11c9b2 |
line wrap: on
line diff
--- a/ac3enc.c Mon Dec 09 00:29:17 2002 +0000 +++ b/ac3enc.c Mon Dec 09 12:03:43 2002 +0000 @@ -826,7 +826,6 @@ }; 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 @@ } ac3_crc_init(); + + avctx->coded_frame= avcodec_alloc_frame(); + avctx->coded_frame->key_frame= 1; return 0; } @@ -1447,6 +1449,11 @@ return output_frame_end(s); } +static int AC3_encode_close(AVCodecContext *avctx) +{ + av_freep(&avctx->coded_frame); +} + #if 0 /*************************************************************************/ /* TEST */ @@ -1546,5 +1553,6 @@ sizeof(AC3EncodeContext), AC3_encode_init, AC3_encode_frame, + AC3_encode_close, NULL, };