summaryrefslogtreecommitdiffstats
path: root/sub/sd_lavc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sub/sd_lavc.c')
-rw-r--r--sub/sd_lavc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c
index ce20ddba2c..f4b85e0784 100644
--- a/sub/sd_lavc.c
+++ b/sub/sd_lavc.c
@@ -462,8 +462,8 @@ static struct sub_bitmaps *get_bitmaps(struct sd *sd, struct mp_osd_res d,
h = MPMAX(priv->video_params.h, current->src_h);
}
- if (opts->sub_pos != 100 && opts->ass_style_override) {
- int offset = (100 - opts->sub_pos) / 100.0 * h;
+ if (opts->sub_pos != 100.0f && opts->ass_style_override) {
+ float offset = (100.0f - opts->sub_pos) / 100.0f * h;
for (int n = 0; n < res->num_parts; n++) {
struct sub_bitmap *sub = &res->parts[n];