HYL_OK3568_LINUX/buildroot/package/gstreamer1/gst1-plugins-base/0017-xvimagesink-Ignore-expose-redraw-when-video-not-read.patch
2025-05-10 21:49:39 +08:00

33 lines
938 B
Diff

From 9207e4ac764e0dce11aedc2807c2f121a76f46ed Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Thu, 4 May 2023 09:12:49 +0800
Subject: [PATCH 17/20] xvimagesink: Ignore expose-redraw when video not ready
See:
https://github.com/JeffyCN/rockchip_mirrors/issues/26
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
sys/xvimage/xvimagesink.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c
index 9f8b594..784a251 100644
--- a/sys/xvimage/xvimagesink.c
+++ b/sys/xvimage/xvimagesink.c
@@ -1690,6 +1690,11 @@ gst_xv_image_sink_expose (GstVideoOverlay * overlay)
GST_DEBUG ("doing expose");
gst_xv_image_sink_xwindow_update_geometry (xvimagesink);
+
+ if (GST_VIDEO_SINK_WIDTH (xvimagesink) <= 0 ||
+ GST_VIDEO_SINK_HEIGHT (xvimagesink) <= 0)
+ return;
+
gst_xv_image_sink_xvimage_put (xvimagesink, NULL);
}
--
2.20.1