[FFmpeg-devel] [PATCH v3 07/10] ffv1enc: expose ff_ffv1_write_extradata

Lynne dev at lynne.ee
Fri Nov 15 06:50:11 EET 2024


---
 libavcodec/ffv1enc.c | 6 ++++--
 libavcodec/ffv1enc.h | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 0ef26db30a..8c0f649b8d 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -393,8 +393,10 @@ static void write_header(FFV1Context *f)
     }
 }
 
-static int write_extradata(FFV1Context *f)
+av_cold int ff_ffv1_write_extradata(AVCodecContext *avctx)
 {
+    FFV1Context *f = avctx->priv_data;
+
     RangeCoder c;
     uint8_t state[CONTEXT_SIZE];
     int i, j, k;
@@ -741,7 +743,7 @@ av_cold int ff_ffv1_encode_init(AVCodecContext *avctx)
         if ((ret = encode_determine_slices(avctx)) < 0)
             return ret;
 
-        if ((ret = write_extradata(s)) < 0)
+        if ((ret = ff_ffv1_write_extradata(avctx)) < 0)
             return ret;
     }
 
diff --git a/libavcodec/ffv1enc.h b/libavcodec/ffv1enc.h
index c062af0bf5..6850243ac1 100644
--- a/libavcodec/ffv1enc.h
+++ b/libavcodec/ffv1enc.h
@@ -26,5 +26,6 @@
 #include "avcodec.h"
 
 av_cold int ff_ffv1_encode_init(AVCodecContext *avctx);
+av_cold int ff_ffv1_write_extradata(AVCodecContext *avctx);
 
 #endif /* AVCODEC_FFV1ENC_H */
-- 
2.45.2.753.g447d99e1c3b


More information about the ffmpeg-devel mailing list