mirror of https://github.com/mpv-player/mpv
sub: fix previous commit
sub_seek and sub_step were broken.
This commit is contained in:
parent
e62c917abf
commit
936a204e27
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue