diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c index 79b4946b65..8febf858ef 100644 --- a/libavcodec/ac3enc_template.c +++ b/libavcodec/ac3enc_template.c @@ -450,7 +450,7 @@ int AC3_NAME(encode_frame)(AVCodecContext *avctx, AVPacket *avpkt, ff_ac3_output_frame(s, avpkt->data); 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); *got_packet_ptr = 1; return 0;