Revert "basetextoverlay: segfault when xpos >= video size"
This is not right, even if it might avoid a crash. We don't want to just set xpos/ypos to 0 in those cases. Clipping should be done properly, see bug #739281 for that. This reverts commit 900d0267d511e9553eec44d948d7e33ead7dc903. https://bugzilla.gnome.org/show_bug.cgi?id=738984 https://bugzilla.gnome.org/show_bug.cgi?id=739281
This commit is contained in:
parent
5339e4507a
commit
a003423bc3
@ -1349,7 +1349,7 @@ gst_base_text_overlay_get_pos (GstBaseTextOverlay * overlay,
|
||||
gint width, height;
|
||||
GstBaseTextOverlayVAlign valign;
|
||||
GstBaseTextOverlayHAlign halign;
|
||||
*ypos = 0;
|
||||
|
||||
width = overlay->image_width;
|
||||
height = overlay->image_height;
|
||||
|
||||
@ -1378,9 +1378,8 @@ gst_base_text_overlay_get_pos (GstBaseTextOverlay * overlay,
|
||||
*xpos = 0;
|
||||
}
|
||||
*xpos += overlay->deltax;
|
||||
if (*xpos > overlay->width || *xpos < 0) {
|
||||
if (*xpos > overlay->width) {
|
||||
/* Clip text if out of frame */
|
||||
*xpos = 0;
|
||||
overlay->silent = TRUE;
|
||||
} else {
|
||||
if (overlay->use_vertical_render)
|
||||
@ -1410,9 +1409,8 @@ gst_base_text_overlay_get_pos (GstBaseTextOverlay * overlay,
|
||||
break;
|
||||
}
|
||||
*ypos += overlay->deltay;
|
||||
if (*ypos > overlay->height || *ypos < 0) {
|
||||
if (*ypos > overlay->height) {
|
||||
/* Clip text if out of frame */
|
||||
*ypos = 0;
|
||||
overlay->silent = TRUE;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user