summaryrefslogtreecommitdiff
path: root/libavcodec/libtwolame.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/libtwolame.c')
-rw-r--r--libavcodec/libtwolame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/libtwolame.c b/libavcodec/libtwolame.c
index def5feeb9d..400985ad32 100644
--- a/libavcodec/libtwolame.c
+++ b/libavcodec/libtwolame.c
@@ -60,7 +60,7 @@ static av_cold int twolame_encode_init(AVCodecContext *avctx)
int ret;
avctx->frame_size = TWOLAME_SAMPLES_PER_FRAME;
- avctx->delay = 512 - 32 + 1;
+ avctx->initial_padding = 512 - 32 + 1;
s->glopts = twolame_init();
if (!s->glopts)
@@ -151,7 +151,7 @@ static int twolame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
avpkt->duration = ff_samples_to_time_base(avctx, frame->nb_samples);
if (frame) {
if (frame->pts != AV_NOPTS_VALUE)
- avpkt->pts = frame->pts - ff_samples_to_time_base(avctx, avctx->delay);
+ avpkt->pts = frame->pts - ff_samples_to_time_base(avctx, avctx->initial_padding);
} else {
avpkt->pts = s->next_pts;
}