summaryrefslogtreecommitdiff
path: root/ext/pango/gstbasetextoverlay.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pango/gstbasetextoverlay.c')
-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);