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

Git pushed a commit to branch release/9.1
in repository ffmpeg.

The following commit(s) were added to refs/heads/release/9.1 by this push:
     new b19b76de55 avcodec/libx265: set has_b_frames
b19b76de55 is described below

commit b19b76de5528db185d0887a931957afbb16d3194
Author:     Baptiste Coudurier <[email protected]>
AuthorDate: Thu Nov 12 13:47:45 2026 -0800
Commit:     Romain Beauxis <[email protected]>
CommitDate: Fri Nov 27 16:26:19 2026 -0600

    avcodec/libx265: set has_b_frames
    
    The wrapper never reported the encoder's reorder delay, unlike libx264.
    Export it from the parameters the encoder actually uses, since
    x265_encoder_open() may change bframes and b-pyramid (all-intra,
    intra refresh, MCSTF, temporal layers).
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Signed-off-by: Baptiste Coudurier <[email protected]>
    (cherry picked from commit 695768baedfef8eab6e75129750ecec9fd1c6728)
---
 libavcodec/libx265.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 0ec4f87f5f..a6738aaa9b 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -608,6 +608,11 @@ static av_cold int libx265_encode_init(AVCodecContext 
*avctx)
         return AVERROR_INVALIDDATA;
     }
 
+    /* x265 may adjust the B-frame settings when opening the encoder */
+    ctx->api->encoder_parameters(ctx->encoder, ctx->params);
+    avctx->has_b_frames = ctx->params->bframes ?
+                          ctx->params->bBPyramid ? 2 : 1 : 0;
+
     if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
         x265_nal *nal;
         int nnal;

-- 
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