diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-04-08 02:43:44 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-04-08 02:43:44 +0300 |
commit | 53eeb0e41238699fb11701c357941f904338bb25 (patch) | |
tree | 965f3585bc690f9b5f654f1022a4c02709911706 /mpcommon.c | |
parent | b309b60a0c7230fae29475e8924ff51f107c2563 (diff) | |
parent | 96daf7ed5ef96b86f2539164c27155bc830aa2a6 (diff) | |
download | mpv-53eeb0e41238699fb11701c357941f904338bb25.tar.bz2 mpv-53eeb0e41238699fb11701c357941f904338bb25.tar.xz |
Merge branch 'ordered_chapters'
Diffstat (limited to 'mpcommon.c')
-rw-r--r-- | mpcommon.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mpcommon.c b/mpcommon.c index 99d70c0ef4..e649f3e49d 100644 --- a/mpcommon.c +++ b/mpcommon.c @@ -69,7 +69,8 @@ if (HAVE_CMOV) } -void update_subtitles(sh_video_t *sh_video, demux_stream_t *d_dvdsub, int reset) +void update_subtitles(sh_video_t *sh_video, demux_stream_t *d_dvdsub, + double video_offset, int reset) { struct MPOpts *opts = sh_video->opts; unsigned char *packet=NULL; @@ -152,10 +153,10 @@ void update_subtitles(sh_video_t *sh_video, demux_stream_t *d_dvdsub, int reset) double endpts; vo_sub = &subs; while (d_dvdsub->first) { - double pts = ds_get_next_pts(d_dvdsub); + double pts = ds_get_next_pts(d_dvdsub) + video_offset; if (pts > curpts) break; - endpts = d_dvdsub->first->endpts; + endpts = d_dvdsub->first->endpts + video_offset; len = ds_get_packet_sub(d_dvdsub, &packet); if (type == 'm') { if (len < 2) continue; |