summaryrefslogtreecommitdiff
path: root/libavcodec/libopencore-amr.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-14 02:16:16 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-14 02:16:16 +0200
commitda2189596d9a339d2e6eb2f14137de93b15b354f (patch)
treea11e6ed2e8f0715fc2d468aa0937ccdf2041fd8a /libavcodec/libopencore-amr.c
parent1f20fa2da83922cd73b090b7f336ba51e25b1fb3 (diff)
parent2df0c32ea12ddfa72ba88309812bfb13b674130f (diff)
downloadffmpeg-da2189596d9a339d2e6eb2f14137de93b15b354f.tar.gz
Merge commit '2df0c32ea12ddfa72ba88309812bfb13b674130f'
* commit '2df0c32ea12ddfa72ba88309812bfb13b674130f': lavc: use a separate field for exporting audio encoder padding Conflicts: libavcodec/audio_frame_queue.c libavcodec/avcodec.h libavcodec/libvorbisenc.c libavcodec/utils.c libavcodec/version.h libavcodec/wmaenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libopencore-amr.c')
-rw-r--r--libavcodec/libopencore-amr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
index 827bdedc00..b2ad839211 100644
--- a/libavcodec/libopencore-amr.c
+++ b/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) {