summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/player.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 6ec593f6c..44fe770ff 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -862,14 +862,14 @@ Player::image_subtitle_start (weak_ptr<Piece> wp, ContentImageSubtitle subtitle)
subtitle.sub.rectangle.x += piece->content->subtitle->x_offset ();
subtitle.sub.rectangle.y += piece->content->subtitle->y_offset ();
+ /* Apply a corrective translation to keep the subtitle centred after the scale that is coming up */
+ subtitle.sub.rectangle.x -= subtitle.sub.rectangle.width * ((piece->content->subtitle->x_scale() - 1) / 2);
+ subtitle.sub.rectangle.y -= subtitle.sub.rectangle.height * ((piece->content->subtitle->y_scale() - 1) / 2);
+
/* Apply content's subtitle scale */
subtitle.sub.rectangle.width *= piece->content->subtitle->x_scale ();
subtitle.sub.rectangle.height *= piece->content->subtitle->y_scale ();
- /* Apply a corrective translation to keep the subtitle centred after that scale */
- subtitle.sub.rectangle.x -= subtitle.sub.rectangle.width * (piece->content->subtitle->x_scale() - 1);
- subtitle.sub.rectangle.y -= subtitle.sub.rectangle.height * (piece->content->subtitle->y_scale() - 1);
-
PlayerSubtitles ps;
ps.image.push_back (subtitle.sub);
DCPTime from (content_time_to_dcp (piece, subtitle.from()));