avcodec/ac3enc_template: use the initial_padding field
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 14 Oct 2014 00:46:51 +0000 (02:46 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 14 Oct 2014 00:46:51 +0000 (02:46 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ac3enc_template.c

index f1f81da..3e02408 100644 (file)
@@ -443,7 +443,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;