summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-16 23:15:59 +0100
committerwm4 <wm4@nowhere>2015-11-16 23:17:33 +0100
commit85450d06a1b1a08fce277f7f14d5ee33b12f8eab (patch)
treece03648a54db276113bbf5d29ce78a3e4c265460 /player/command.c
parent70df1608d6f74f3eba9a5e593822984194f63951 (diff)
downloadmpv-85450d06a1b1a08fce277f7f14d5ee33b12f8eab.tar.bz2
mpv-85450d06a1b1a08fce277f7f14d5ee33b12f8eab.tar.xz
player: use demuxer ts offset to simplify timeline ts handling
Use the demux_set_ts_offset() added in the previous commit to base each timeline segment to use timestamps according to its relative position within the overall timeline. As a consequence we don't need to care about these timestamps anymore, and everything becomes simpler. (Another minor but delicious nugget of sanity.)
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c
index 2e29f994de..f6ccf22cae 100644
--- a/player/command.c
+++ b/player/command.c
@@ -4477,7 +4477,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
double refpts = get_current_time(mpctx);
if (state.dec_sub && refpts != MP_NOPTS_VALUE) {
double a[2];
- a[0] = refpts - state.video_offset - opts->sub_delay;
+ a[0] = refpts - opts->sub_delay;
a[1] = cmd->args[0].v.i;
if (sub_control(state.dec_sub, SD_CTRL_SUB_STEP, a) > 0) {
if (cmd->id == MP_CMD_SUB_STEP) {