X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Flibfaac.c;h=98b3ba81830b606de3f7b1365018c87ee69e8120;hb=5d324dae114e7abbb7f52f8853283b25302a2cd9;hp=69c186b11a7f3a8f451f3afac95fe20d80fb4513;hpb=46f01e413320acb86a66d13d13735694d1a0364d;p=ffmpeg diff --git a/libavcodec/libfaac.c b/libavcodec/libfaac.c index 69c186b11a7..98b3ba81830 100644 --- a/libavcodec/libfaac.c +++ b/libavcodec/libfaac.c @@ -117,7 +117,7 @@ static av_cold int Faac_encode_init(AVCodecContext *avctx) faac_cfg->allowMidside = 1; faac_cfg->bitRate = avctx->bit_rate / avctx->channels; faac_cfg->bandWidth = avctx->cutoff; - if(avctx->flags & CODEC_FLAG_QSCALE) { + if(avctx->flags & AV_CODEC_FLAG_QSCALE) { faac_cfg->bitRate = 0; faac_cfg->quantqual = avctx->global_quality / FF_QP2LAMBDA; } @@ -131,14 +131,14 @@ static av_cold int Faac_encode_init(AVCodecContext *avctx) /* Set decoder specific info */ avctx->extradata_size = 0; - if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) { + if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) { unsigned char *buffer = NULL; unsigned long decoder_specific_info_size; if (!faacEncGetDecoderSpecificInfo(s->faac_handle, &buffer, &decoder_specific_info_size)) { - avctx->extradata = av_malloc(decoder_specific_info_size + FF_INPUT_BUFFER_PADDING_SIZE); + avctx->extradata = av_malloc(decoder_specific_info_size + AV_INPUT_BUFFER_PADDING_SIZE); if (!avctx->extradata) { ret = AVERROR(ENOMEM); goto error; @@ -184,7 +184,7 @@ static int Faac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, int num_samples = frame ? frame->nb_samples : 0; void *samples = frame ? frame->data[0] : NULL; - if ((ret = ff_alloc_packet2(avctx, avpkt, (7 + 768) * avctx->channels)) < 0) + if ((ret = ff_alloc_packet2(avctx, avpkt, (7 + 768) * avctx->channels, 0)) < 0) return ret; bytes_written = faacEncEncode(s->faac_handle, samples, @@ -240,7 +240,7 @@ AVCodec ff_libfaac_encoder = { .init = Faac_encode_init, .encode2 = Faac_encode_frame, .close = Faac_encode_close, - .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY, + .capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, .profiles = NULL_IF_CONFIG_SMALL(profiles),