From a2e4ccc38bd108de9bba8b366acaab7e218e3a1b Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Mon, 20 Jul 2015 16:25:10 -0400 Subject: [PATCH] basetextoverlay: Fix upstream composition handling We need to update the render when upstream composition changes or if it was removed. http://bugzilla.gnome.org/show_bug.cgi?id=751157 --- ext/pango/gstbasetextoverlay.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c index 647668d..f0d8cd2 100644 --- a/ext/pango/gstbasetextoverlay.c +++ b/ext/pango/gstbasetextoverlay.c @@ -2406,8 +2406,14 @@ gst_base_text_overlay_video_chain (GstPad * pad, GstObject * parent, composition_meta = gst_buffer_get_video_overlay_composition_meta (buffer); if (composition_meta) { - GST_DEBUG ("GstVideoOverlayCompositionMeta found."); - overlay->upstream_composition = composition_meta->overlay; + if (overlay->upstream_composition != composition_meta->overlay) { + GST_DEBUG ("GstVideoOverlayCompositionMeta found."); + overlay->upstream_composition = composition_meta->overlay; + overlay->need_render = TRUE; + } + } else if (overlay->upstream_composition != NULL) { + overlay->upstream_composition = NULL; + overlay->need_render = TRUE; } klass = GST_BASE_TEXT_OVERLAY_GET_CLASS (overlay); -- 2.7.4