diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-12-02 13:43:05 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-12-02 13:47:48 +0200 |
commit | 6da77386e99a511c36df4fde03489bab7f0d1b07 (patch) | |
tree | 98261b232a4eff10a2c1a4625e06a816c7aa36d1 /mplayer.c | |
parent | 4ef079f279df11038337cff510e9e801a11317bb (diff) | |
download | mpv-6da77386e99a511c36df4fde03489bab7f0d1b07.tar.bz2 mpv-6da77386e99a511c36df4fde03489bab7f0d1b07.tar.xz |
core: Fix timeline state at start of playback
A timeline starting in the middle of a source file resulted in initial
playback state not being set up properly. Fix this by forcing an
absolute seek to initialize timeline state before playback starts.
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2924,7 +2924,6 @@ static void build_ordered_chapter_timeline(struct MPContext *mpctx) mpctx->chapters = chapters; mpctx->timeline_part = 0; - mpctx->video_offset = timeline[0].source_start; mpctx->demuxer = timeline[0].source->demuxer; } @@ -3953,7 +3952,8 @@ if(play_n_frames==0){ mpctx->stop_play=PT_NEXT_ENTRY; goto goto_next_file; } -if (seek_to_sec) { +// If there's a timeline force an absolute seek to initialize state +if (seek_to_sec || mpctx->timeline) { seek(mpctx, seek_to_sec, SEEK_ABSOLUTE); end_at.pos += seek_to_sec; } |