Fix subtitle delay inversion

This commit is contained in:
Martin Herkt 2014-01-06 17:09:31 +01:00
parent df116958df
commit e62c917abf
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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);