[FFmpeg-devel] [PATCH 2/5] libmp3lame + mp3enc: removes decoder delay compensation

Michael Niedermayer michael at niedermayer.cc
Wed Jul 13 02:53:28 EEST 2016


On Tue, Jul 12, 2016 at 04:19:53PM -0700, Jon Toohill wrote:
> initial_padding specifies only encoder delay, decoder delay is
> handled by start_skip_samples.
> ---
>  doc/APIchanges          | 4 ++++
>  libavcodec/libmp3lame.c | 2 +-
>  libavcodec/version.h    | 2 +-
>  libavformat/mp3enc.c    | 4 ++--
>  4 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index d777dc0..ae450e1 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -15,6 +15,10 @@ libavutil:     2015-08-28
>  
>  API changes, most recent first:
>  
> +2016-07-12 - xxxxxxx - lavc 57.47.100 - libmp3lame.c
> +  Removed MP3 decoder delay from initial_padding in AVCodecContext.
> +  initial_padding only includes the encoder delay.
> +
>  2016-04-27 - xxxxxxx - lavu 55.23.100 - log.h
>    Add a new function av_log_format_line2() which returns number of bytes
>    written to the target buffer.
> diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
> index 5642264..198ac94 100644
> --- a/libavcodec/libmp3lame.c
> +++ b/libavcodec/libmp3lame.c
> @@ -137,7 +137,7 @@ static av_cold int mp3lame_encode_init(AVCodecContext *avctx)
>      }
>  
>      /* get encoder delay */
> -    avctx->initial_padding = lame_get_encoder_delay(s->gfp) + 528 + 1;
> +    avctx->initial_padding = lame_get_encoder_delay(s->gfp);
>      ff_af_queue_init(avctx, &s->afq);
>  
>      avctx->frame_size  = lame_get_framesize(s->gfp);
> diff --git a/libavcodec/version.h b/libavcodec/version.h
> index 0852b43..37a6e17 100644
> --- a/libavcodec/version.h
> +++ b/libavcodec/version.h
> @@ -28,7 +28,7 @@
>  #include "libavutil/version.h"
>  
>  #define LIBAVCODEC_VERSION_MAJOR  57
> -#define LIBAVCODEC_VERSION_MINOR  46
> +#define LIBAVCODEC_VERSION_MINOR  47

master is at 50
release/3.1 is at 48

the issue described in the last patchset a moment ago
./ffmpeg -i  ~/videos/matrixbench_mpeg2.mpg  -acodec mp3 -vn -t 1 file.mp4

applies to teh new patch 1+2 too

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160713/25bbf26a/attachment.sig>


More information about the ffmpeg-devel mailing list