*/
/**
- * @file libavcodec/libxvidff.c
+ * @file
* Interface to xvidcore for MPEG-4 compliant encoding.
* @author Adam Thayer (krevnik@comcast.net)
*/
* @param avctx AVCodecContext pointer to context
* @return Returns 0 on success, -1 on failure
*/
-av_cold int ff_xvid_encode_init(AVCodecContext *avctx) {
+static av_cold int xvid_encode_init(AVCodecContext *avctx) {
int xerr, i;
int xvid_flags = avctx->flags;
struct xvid_context *x = avctx->priv_data;
* @param data Pointer to AVFrame of unencoded frame
* @return Returns 0 on success, -1 on failure
*/
-int ff_xvid_encode_frame(AVCodecContext *avctx,
+static int xvid_encode_frame(AVCodecContext *avctx,
unsigned char *frame, int buf_size, void *data) {
int xerr, i;
char *tmp;
* @param avctx AVCodecContext pointer to context
* @return Returns 0, success guaranteed
*/
-av_cold int ff_xvid_encode_close(AVCodecContext *avctx) {
+static av_cold int xvid_encode_close(AVCodecContext *avctx) {
struct xvid_context *x = avctx->priv_data;
xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL);
if( avctx->extradata != NULL )
- av_free(avctx->extradata);
+ av_freep(&avctx->extradata);
if( x->twopassbuffer != NULL ) {
av_free(x->twopassbuffer);
av_free(x->old_twopassbuffer);
*/
AVCodec libxvid_encoder = {
"libxvid",
- CODEC_TYPE_VIDEO,
- CODEC_ID_XVID,
+ AVMEDIA_TYPE_VIDEO,
+ CODEC_ID_MPEG4,
sizeof(struct xvid_context),
- ff_xvid_encode_init,
- ff_xvid_encode_frame,
- ff_xvid_encode_close,
+ xvid_encode_init,
+ xvid_encode_frame,
+ xvid_encode_close,
.pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
.long_name= NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"),
};