From 3cdc9bc6cb86e8f263861472cac1f4ca4c59cc67 Mon Sep 17 00:00:00 2001
From: Moses Turner <moses@collabora.com>
Date: Tue, 14 Jun 2022 13:58:54 +0100
Subject: [PATCH] a/gst: Explain why we require evenly-sized frames (NFC)

---
 src/xrt/auxiliary/gstreamer/gst_sink.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/xrt/auxiliary/gstreamer/gst_sink.c b/src/xrt/auxiliary/gstreamer/gst_sink.c
index 60ec12cce..e512bb2c8 100644
--- a/src/xrt/auxiliary/gstreamer/gst_sink.c
+++ b/src/xrt/auxiliary/gstreamer/gst_sink.c
@@ -55,6 +55,9 @@ gst_fmt_from_xf_format(enum xrt_format format_in)
 static void
 complain_if_wrong_image_size(struct xrt_frame *xf)
 {
+	// libx264 is the actual source of this requirement; it refuses to handle odd widths/heights when encoding I420
+	// subsampled content. OpenH264 should work, but it's easy enough to just force all users of this code to
+	// provide normal-sized inputs.
 	if (xf->width % 2 == 1) {
 		U_LOG_W("Image width needs to be divisible by 2!");
 	}