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