From cc3a79d7f171772a99f742278470b20ba3b0fff5 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Thu, 26 Nov 2020 15:57:10 +0100 Subject: [PATCH] compositor: a pad without a frame can't obscure the background Skip those when considering whether the background should be drawn Part-of: --- subprojects/gst-plugins-base/gst/compositor/compositor.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst/compositor/compositor.c b/subprojects/gst-plugins-base/gst/compositor/compositor.c index 1046db8085..1c08715188 100644 --- a/subprojects/gst-plugins-base/gst/compositor/compositor.c +++ b/subprojects/gst-plugins-base/gst/compositor/compositor.c @@ -1241,7 +1241,10 @@ _should_draw_background (GstVideoAggregator * vagg) /* Check if the background is completely obscured by a pad * TODO: Also skip if it's obscured by a combination of pads */ for (l = GST_ELEMENT (vagg)->sinkpads; l; l = l->next) { - if (gst_aggregator_pad_is_inactive (GST_AGGREGATOR_PAD (l->data))) + if (gst_aggregator_pad_is_inactive (GST_AGGREGATOR_PAD (l->data)) + || + gst_video_aggregator_pad_get_prepared_frame (GST_VIDEO_AGGREGATOR_PAD + (l->data)) == NULL) continue; if (_pad_obscures_rectangle (vagg, l->data, bg_rect)) {