This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new a3d8ede74d avcodec/libmp3lame: honor strict ISO compliance
a3d8ede74d is described below

commit a3d8ede74d8875d69eaefc90c048c068c53a0185
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sun Sep 20 12:25:50 2026 +0000
Commit:     michaelni <[email protected]>
CommitDate: Thu Oct 1 02:14:48 2026 +0000

    avcodec/libmp3lame: honor strict ISO compliance
    
    Enable LAME strict ISO buffer constraints when strict_std_compliance is at 
least FF_COMPLIANCE_STRICT, as suggested in #23733. Preserve the library 
defaults for lower compliance levels.
    
    This lets users opt into the constraints used by lame 
--strictly-enforce-ISO without changing the requested sample rate or bitrate. 
Document the mapping.
    
    Assisted-by: Fairy
---
 doc/encoders.texi       | 6 ++++++
 libavcodec/libmp3lame.c | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/doc/encoders.texi b/doc/encoders.texi
index a3ce15fcff..3a07b9d3d7 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -895,6 +895,12 @@ while producing the worst quality.
 Set lowpass cutoff frequency. If unspecified, the encoder dynamically
 adjusts the cutoff.
 
+@item strict (@emph{--strictly-enforce-ISO})
+Enable LAME's strict ISO buffer constraints when set to @samp{strict} or
+@samp{very}. Other values leave LAME's default buffer constraints unchanged.
+This can improve compatibility with some decoders, at the cost of reduced
+bit reservoir usage.
+
 @item reservoir
 Enable use of bit reservoir when set to 1. Default value is 1. LAME
 has this enabled by default, but can be overridden by use
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 88a5ba34a8..b84cfa8b4d 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -146,6 +146,10 @@ static av_cold int mp3lame_encode_init(AVCodecContext 
*avctx)
     /* original flag */
     lame_set_original(s->gfp, s->original);
 
+    /* strict ISO compliance */
+    if (avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT)
+        lame_set_strict_ISO(s->gfp, 1);
+
     /* set specified parameters */
     if (lame_init_params(s->gfp) < 0) {
         ret = AVERROR_EXTERNAL;

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to