Stop gap solution. I don't know enough about mpegvideo_enc to provide a
proper implementation, nor do I have access to NDI hardware to feel
comfortable with it. This patch at least prevents us from outputting
files that we know are broken

/Tomas
From 9dd76f9ec153c3d10374a2a4a74348dc39458c07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <g...@haerdin.se>
Date: Tue, 14 May 2024 13:03:22 +0200
Subject: [PATCH] lavc/speedhqenc: Require width to be a multiple of 16

---
 libavcodec/speedhqenc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/speedhqenc.c b/libavcodec/speedhqenc.c
index 5b4ff4c139..39ed244bca 100644
--- a/libavcodec/speedhqenc.c
+++ b/libavcodec/speedhqenc.c
@@ -104,6 +104,12 @@ av_cold int ff_speedhq_encode_init(MpegEncContext *s)
         return AVERROR(EINVAL);
     }
 
+    // border is not implemented correctly at the moment, see ticket #10078
+    if (s->width % 16) {
+        av_log(s, AV_LOG_ERROR, "width must be a multiple of 16\n");
+        return AVERROR_PATCHWELCOME;
+    }
+
     s->min_qcoeff = -2048;
     s->max_qcoeff = 2047;
 
-- 
2.39.2

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

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

Reply via email to