From 936a204e27e6aad4a7689c2543bcbd24a5fc958c Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 6 Jan 2014 17:38:10 +0100 Subject: sub: fix previous commit sub_seek and sub_step were broken. --- player/command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player/command.c') diff --git a/player/command.c b/player/command.c index 0275babee6..6a139bff59 100644 --- a/player/command.c +++ b/player/command.c @@ -2737,11 +2737,11 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) struct osd_object *obj = mpctx->osd->objs[OSDTYPE_SUB]; if (obj->dec_sub) { double a[2]; - a[0] = mpctx->video_pts - obj->video_offset + opts->sub_delay; + a[0] = mpctx->video_pts - obj->video_offset - opts->sub_delay; a[1] = cmd->args[0].v.i; if (sub_control(obj->dec_sub, SD_CTRL_SUB_STEP, a) > 0) { if (cmd->id == MP_CMD_SUB_STEP) { - opts->sub_delay += a[0]; + opts->sub_delay -= a[0]; osd_changed_all(mpctx->osd); set_osd_msg(mpctx, OSD_MSG_SUB_DELAY, osdl, osd_duration, "Sub delay: %d ms", ROUND(opts->sub_delay * 1000)); -- cgit v1.2.3