};
avctx->frame_size = AC3_FRAME_SIZE;
- avctx->key_frame = 1; /* always key frame */
/* number of channels */
if (channels < 1 || channels > 6)
}
ac3_crc_init();
+
+ avctx->coded_frame= avcodec_alloc_frame();
+ avctx->coded_frame->key_frame= 1;
return 0;
}
return output_frame_end(s);
}
+static int AC3_encode_close(AVCodecContext *avctx)
+{
+ av_freep(&avctx->coded_frame);
+}
+
#if 0
/*************************************************************************/
/* TEST */
sizeof(AC3EncodeContext),
AC3_encode_init,
AC3_encode_frame,
+ AC3_encode_close,
NULL,
};