textoverlay: fix disappearing text with high deltax

When deltax is large enough to cause the text to push past the
width of the frame, it would disappear due to a bug in setting
the layout width.

While there, fix a log printing an incorrect width to set.

https://bugzilla.gnome.org/show_bug.cgi?id=739689
This commit is contained in:
Vincent Penquerc'h 2015-03-18 16:32:53 +00:00
parent b590a843f4
commit b247001aa9

View file

@ -670,11 +670,11 @@ gst_base_text_overlay_update_wrap_mode (GstBaseTextOverlay * overlay)
} }
} else { } else {
width = width =
(overlay->use_vertical_render ? overlay->height : overlay->width) * ((overlay->use_vertical_render ? overlay->height : overlay->width) -
PANGO_SCALE; overlay->deltax) * PANGO_SCALE;
} }
GST_DEBUG_OBJECT (overlay, "Set layout width %d", overlay->width); GST_DEBUG_OBJECT (overlay, "Set layout width %d", width);
GST_DEBUG_OBJECT (overlay, "Set wrap mode %d", overlay->wrap_mode); GST_DEBUG_OBJECT (overlay, "Set wrap mode %d", overlay->wrap_mode);
pango_layout_set_width (overlay->layout, width); pango_layout_set_width (overlay->layout, width);
pango_layout_set_wrap (overlay->layout, (PangoWrapMode) overlay->wrap_mode); pango_layout_set_wrap (overlay->layout, (PangoWrapMode) overlay->wrap_mode);