ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Mon Nov 18 18:21:54 
2024 -0300| [d6b39373a23c24fa990d17be4b4739b6651ea8ac] | committer: James Almer

avcodec/ffv1enc: restore header writing behavior for version > 1

Broken by accident in a6c58353ac0.

Signed-off-by: James Almer <jamr...@gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d6b39373a23c24fa990d17be4b4739b6651ea8ac
---

 libavcodec/ffv1enc.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 352a0fde13..4f0bd4f973 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -918,11 +918,13 @@ static int encode_init_internal(AVCodecContext *avctx)
     if (ret < 0)
         return ret;
 
-    if ((ret = encode_determine_slices(avctx)) < 0)
-        return ret;
+    if (s->version > 1) {
+        if ((ret = encode_determine_slices(avctx)) < 0)
+            return ret;
 
-    if ((ret = ff_ffv1_write_extradata(avctx)) < 0)
-        return ret;
+        if ((ret = ff_ffv1_write_extradata(avctx)) < 0)
+            return ret;
+    }
 
     if ((ret = ff_ffv1_init_slice_contexts(s)) < 0)
         return ret;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to