summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2015-03-03 21:36:20 (GMT)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2015-03-03 21:38:33 (GMT)
commitace35b78ee81311983fc3f87a2480d188b297045 (patch)
tree1e3f28feed8e2b281d1cdc2855559b3f92b714cf
parent557c2c9be1f9156a66df88fa6cc725ffa5a73615 (diff)
downloadgst-plugins-base-ace35b78ee81311983fc3f87a2480d188b297045.tar.gz
gst-plugins-base-ace35b78ee81311983fc3f87a2480d188b297045.tar.xz
textoverlay: Re-render if video size changed
https://bugzilla.gnome.org/show_bug.cgi?id=745554
-rw-r--r--ext/pango/gstbasetextoverlay.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c
index 4327a2a..a300f32 100644
--- a/ext/pango/gstbasetextoverlay.c
+++ b/ext/pango/gstbasetextoverlay.c
@@ -848,6 +848,11 @@ gst_base_text_overlay_setcaps (GstBaseTextOverlay * overlay, GstCaps * caps)
if (!gst_video_info_from_caps (&info, caps))
goto invalid_caps;
+ /* Render again if size have changed */
+ if (GST_VIDEO_INFO_WIDTH (&info) != GST_VIDEO_INFO_WIDTH (&overlay->info) ||
+ GST_VIDEO_INFO_HEIGHT (&info) != GST_VIDEO_INFO_HEIGHT (&overlay->info))
+ overlay->need_render = TRUE;
+
overlay->info = info;
overlay->format = GST_VIDEO_INFO_FORMAT (&info);
overlay->width = GST_VIDEO_INFO_WIDTH (&info);