compositor: a pad without a frame can't obscure the background

Skip those when considering whether the background should be
drawn

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/708>
This commit is contained in:
Mathieu Duponchelle 2020-11-26 15:57:10 +01:00 committed by GStreamer Marge Bot
parent da25b95bdf
commit cc3a79d7f1

View file

@ -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)) {