X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavcodec%2Flibopencore-amr.c;h=b2ad839211c45d4a2c1d6a48dc5201ed5c380461;hp=827bdedc00c3bcee85b7756db07b3b5c75ddb67f;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavcodec/libopencore-amr.c b/ffmpeg/libavcodec/libopencore-amr.c index 827bded..b2ad839 100644 --- a/ffmpeg/libavcodec/libopencore-amr.c +++ b/ffmpeg/libavcodec/libopencore-amr.c @@ -199,7 +199,7 @@ static av_cold int amr_nb_encode_init(AVCodecContext *avctx) } avctx->frame_size = 160; - avctx->delay = 50; + avctx->initial_padding = 50; ff_af_queue_init(avctx, &s->afq); s->enc_state = Encoder_Interface_init(s->enc_dtx); @@ -246,7 +246,7 @@ static int amr_nb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return AVERROR(ENOMEM); memcpy(flush_buf, samples, frame->nb_samples * sizeof(*flush_buf)); samples = flush_buf; - if (frame->nb_samples < avctx->frame_size - avctx->delay) + if (frame->nb_samples < avctx->frame_size - avctx->initial_padding) s->enc_last_frame = -1; } if ((ret = ff_af_queue_add(&s->afq, frame)) < 0) {