From 49865826b0b4b9c53df52531580018c2545559f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Brzezi=C5=84ski?= Date: Tue, 7 Nov 2023 00:27:57 +0100 Subject: [PATCH] basetextoverlay: Fix overlay never rendering again if width reaches 1px If text width ever reached 1px, for example after resizing the output window, the overlay would stop rendering and never return again. The 1px condition itself does not seem to make much sense here anyway. This was a chain of events: width reached 1, so the composition was set to NULL. Then, after resizing the output window, push_frame() was called but would not attempt to renegotiate because composition is NULL. This caused the width/height to never be updated again, as that only happens during negotiation, so the overlay was gone for good. Part-of: --- subprojects/gst-plugins-base/ext/pango/gstbasetextoverlay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/ext/pango/gstbasetextoverlay.c b/subprojects/gst-plugins-base/ext/pango/gstbasetextoverlay.c index 9eb7d305fb..1000ec8a0b 100644 --- a/subprojects/gst-plugins-base/ext/pango/gstbasetextoverlay.c +++ b/subprojects/gst-plugins-base/ext/pango/gstbasetextoverlay.c @@ -1656,7 +1656,7 @@ gst_base_text_overlay_set_composition (GstBaseTextOverlay * overlay) gint xpos, ypos; GstVideoOverlayRectangle *rectangle; - if (overlay->text_image && overlay->text_width != 1) { + if (overlay->text_image) { gint render_width, render_height; gst_base_text_overlay_get_pos (overlay, &xpos, &ypos);