--- faac.c.orig 2007-02-28 10:56:15.000000000 +0100 +++ faac.c 2007-03-16 03:14:30.000000000 +0100 @@ -28,28 +28,28 @@ #include typedef struct FaacAudioContext { - faacEncHandle faac_handle; + NeAACEncHandle faac_handle; } FaacAudioContext; static int Faac_encode_init(AVCodecContext *avctx) { FaacAudioContext *s = avctx->priv_data; - faacEncConfigurationPtr faac_cfg; + NeAACEncConfigurationPtr faac_cfg; unsigned long samples_input, max_bytes_output; /* number of channels */ if (avctx->channels < 1 || avctx->channels > 6) return -1; - s->faac_handle = faacEncOpen(avctx->sample_rate, + s->faac_handle = NeAACEncOpen(avctx->sample_rate, avctx->channels, &samples_input, &max_bytes_output); /* check faac version */ - faac_cfg = faacEncGetCurrentConfiguration(s->faac_handle); + faac_cfg = NeAACEncGetCurrentConfiguration(s->faac_handle); if (faac_cfg->version != FAAC_CFG_VERSION) { av_log(avctx, AV_LOG_ERROR, "wrong libfaac version (compiled for: %d, using %d)\n", FAAC_CFG_VERSION, faac_cfg->version); - faacEncClose(s->faac_handle); + NeAACEncClose(s->faac_handle); return -1; } @@ -79,7 +79,7 @@ unsigned char *buffer = NULL; unsigned long decoder_specific_info_size; - if (!faacEncGetDecoderSpecificInfo(s->faac_handle, &buffer, + if (!NeAACEncGetDecoderSpecificInfo(s->faac_handle, &buffer, &decoder_specific_info_size)) { avctx->extradata = av_malloc(decoder_specific_info_size + FF_INPUT_BUFFER_PADDING_SIZE); avctx->extradata_size = decoder_specific_info_size; @@ -91,7 +91,7 @@ #define free please_use_av_free } - if (!faacEncSetConfiguration(s->faac_handle, faac_cfg)) { + if (!NeAACEncSetConfiguration(s->faac_handle, faac_cfg)) { av_log(avctx, AV_LOG_ERROR, "libfaac doesn't support this output format!\n"); return -1; } @@ -105,7 +105,7 @@ FaacAudioContext *s = avctx->priv_data; int bytes_written; - bytes_written = faacEncEncode(s->faac_handle, + bytes_written = NeAACEncEncode(s->faac_handle, data, avctx->frame_size * avctx->channels, frame, @@ -121,7 +121,7 @@ av_freep(&avctx->coded_frame); av_freep(&avctx->extradata); - faacEncClose(s->faac_handle); + NeAACEncClose(s->faac_handle); return 0; }