summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--player/sub.c2
-rw-r--r--sub/osd.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/player/sub.c b/player/sub.c
index cc8f89a531..734cbcf7e4 100644
--- a/player/sub.c
+++ b/player/sub.c
@@ -102,7 +102,7 @@ static void update_subtitle(struct MPContext *mpctx, int order)
osd_obj->video_offset = track->under_timeline ? mpctx->video_offset : 0;
double refpts_s = mpctx->playback_pts - osd_obj->video_offset;
- double curpts_s = refpts_s + opts->sub_delay;
+ double curpts_s = refpts_s - opts->sub_delay;
if (!track->preloaded && track->stream) {
struct sh_stream *sh_stream = track->stream;
diff --git a/sub/osd.c b/sub/osd.c
index 107ca232cf..16c1288f5d 100644
--- a/sub/osd.c
+++ b/sub/osd.c
@@ -162,7 +162,7 @@ static void render_object(struct osd_state *osd, struct osd_object *obj,
if (obj->render_bitmap_subs && obj->dec_sub) {
double sub_pts = video_pts;
if (sub_pts != MP_NOPTS_VALUE)
- sub_pts -= obj->video_offset - opts->sub_delay;
+ sub_pts -= obj->video_offset + opts->sub_delay;
sub_get_bitmaps(obj->dec_sub, obj->vo_res, sub_pts, out_imgs);
} else {
osd_object_get_bitmaps(osd, obj, out_imgs);