summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Oshmyan <chortos@inbox.lv>2020-03-28 03:42:02 +0200
committerOleg Oshmyan <chortos@inbox.lv>2020-07-05 21:25:52 +0300
commitb27befb1fd974a6b53518e338fd3953ff821fb35 (patch)
treeb64bd5c9c03c4255c84a848d479a4800619b6796
parented341f0caf3fcef2d60082783ac30ffe662008dd (diff)
downloadlibass-b27befb1fd974a6b53518e338fd3953ff821fb35.tar.bz2
libass-b27befb1fd974a6b53518e338fd3953ff821fb35.tar.xz
Fix incorrect collision detection coordinates with anamorphic video
device_x is in anamorphic coordinates, the product of x2scr (not x2scr_scaled).
-rw-r--r--libass/ass_render.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index b77a75b..0d0a9ef 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -2750,7 +2750,7 @@ ass_render_event(ASS_Renderer *render_priv, ASS_Event *event,
event_images->top = device_y - text_info->lines[0].asc;
event_images->height = text_info->height;
event_images->left =
- (device_x + bbox.x_min * render_priv->font_scale_x) + 0.5;
+ (device_x + bbox.x_min) * render_priv->font_scale_x + 0.5;
event_images->width =
(bbox.x_max - bbox.x_min) * render_priv->font_scale_x + 0.5;
event_images->detect_collisions = render_priv->state.detect_collisions;