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

Git pushed a commit to branch master
in repository ffmpeg.

commit be3757f6e93e07c1d9322438a1d0ce7422427c35
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Thu Aug 13 18:27:16 2026 +0200
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Fri Aug 14 18:28:09 2026 +0200

    avcodec/codec_internal: Put bsfs and reconf in a union
    
    Reduces sizeof(FFCodec)
    
    Reviewed-by: James Almer <[email protected]>
    Reviewed-by: Kacper Michajłow <[email protected]>
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/codec_internal.h | 22 ++++++++++++----------
 libavcodec/tests/avcodec.c  |  2 +-
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/libavcodec/codec_internal.h b/libavcodec/codec_internal.h
index 6422c9996b..7b7bde7cae 100644
--- a/libavcodec/codec_internal.h
+++ b/libavcodec/codec_internal.h
@@ -256,17 +256,19 @@ typedef struct FFCodec {
      */
     void (*flush)(struct AVCodecContext *);
 
-    /**
-     * Reconfigure the encoder
-     * Called by avcodec_encode_reconfigure()
-     */
-    int (*reconf)(struct AVCodecContext *avctx, struct AVDictionary **dict);
+    union {
+        /**
+        * Encoding only. Reconfigure the encoder
+        * Called by avcodec_encode_reconfigure()
+        */
+        int (*reconf)(struct AVCodecContext *avctx, struct AVDictionary 
**dict);
 
-    /**
-     * Decoding only, a comma-separated list of bitstream filters to apply to
-     * packets before decoding.
-     */
-    const char *bsfs;
+        /**
+        * Decoding only, a comma-separated list of bitstream filters to apply 
to
+        * packets before decoding.
+        */
+        const char *bsfs;
+    };
 
     /**
      * Array of pointers to hardware configurations supported by the codec,
diff --git a/libavcodec/tests/avcodec.c b/libavcodec/tests/avcodec.c
index a24c21c421..3ae578328e 100644
--- a/libavcodec/tests/avcodec.c
+++ b/libavcodec/tests/avcodec.c
@@ -172,7 +172,7 @@ int main(void){
         if (is_encoder) {
             if ((codec->type == AVMEDIA_TYPE_SUBTITLE) != (codec2->cb_type == 
FF_CODEC_CB_TYPE_ENCODE_SUB))
                 ERR("Encoder %s is both subtitle encoder and not subtitle 
encoder.");
-            if (codec2->update_thread_context || 
codec2->update_thread_context_for_user || codec2->bsfs)
+            if (codec2->update_thread_context || 
codec2->update_thread_context_for_user)
                 ERR("Encoder %s has decoder-only thread functions or bsf.\n");
             if (codec2->reconf && !(codec->capabilities & 
AV_CODEC_CAP_ENCODER_RECONF))
                 ERR("Encoder %s has reconf callback without supporting 
recondiguration.\n");

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to