summaryrefslogtreecommitdiffstats
path: root/player/audio.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-15 23:32:37 +0200
committerwm4 <wm4@nowhere>2014-08-15 23:32:37 +0200
commitfa7c421588cb856481a948d2a95eef7c9e228b45 (patch)
tree34ca0ab3d1cac35135b07cb67d4646221d140158 /player/audio.c
parent318e8da25071a76a3d88944304ae91f6d25d7f43 (diff)
downloadmpv-fa7c421588cb856481a948d2a95eef7c9e228b45.tar.bz2
mpv-fa7c421588cb856481a948d2a95eef7c9e228b45.tar.xz
player: use virtual time for --audio-file with ordered chapters
Apparently users prefer this behavior. It was used for subtitles too, so move the code to calculate the video offset into a separate function. Seeking also needs to be fixed. Fixes #1018.
Diffstat (limited to 'player/audio.c')
-rw-r--r--player/audio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/audio.c b/player/audio.c
index 55e3ba7c5e..abb81f987c 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -255,7 +255,8 @@ double written_audio_pts(struct MPContext *mpctx)
// to get the length in original units without speedup or slowdown
a_pts -= buffered_output * mpctx->opts->playback_speed;
- return a_pts + mpctx->video_offset;
+ return a_pts +
+ get_track_video_offset(mpctx, mpctx->current_track[0][STREAM_AUDIO]);
}
// Return pts value corresponding to currently playing audio.