X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavcodec%2Fmpegaudioenc_template.c;fp=ffmpeg%2Flibavcodec%2Fmpegaudioenc_template.c;h=1bf9471ffe1cd82d4ce2d33f9530fd3b3f02d19b;hp=e9571d83c76330aee2fb1528ec3f59855d754050;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavcodec/mpegaudioenc_template.c b/ffmpeg/libavcodec/mpegaudioenc_template.c index e9571d8..1bf9471 100644 --- a/ffmpeg/libavcodec/mpegaudioenc_template.c +++ b/ffmpeg/libavcodec/mpegaudioenc_template.c @@ -89,7 +89,7 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx) bitrate = bitrate / 1000; s->nb_channels = channels; avctx->frame_size = MPA_FRAME_SIZE; - avctx->delay = 512 - 32 + 1; + avctx->initial_padding = 512 - 32 + 1; /* encoding freq */ s->lsf = 0; @@ -771,7 +771,7 @@ static int MPA_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, encode_frame(s, bit_alloc, padding); 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); avpkt->size = put_bits_count(&s->pb) / 8; *got_packet_ptr = 1;