diff options
author | wm4 <wm4@nowhere> | 2014-01-06 17:38:10 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-01-06 17:38:10 +0100 |
commit | 936a204e27e6aad4a7689c2543bcbd24a5fc958c (patch) | |
tree | 723f665936fd4643ba92554f6ca212fe0769d7c0 | |
parent | e62c917abf6d400416fea523ea2d844af3662935 (diff) | |
download | mpv-936a204e27e6aad4a7689c2543bcbd24a5fc958c.tar.bz2 mpv-936a204e27e6aad4a7689c2543bcbd24a5fc958c.tar.xz |
sub: fix previous commit
sub_seek and sub_step were broken.
-rw-r--r-- | player/command.c | 4 |
1 files changed, 2 insertions, 2 deletions
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)); |