summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authoruau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-27 01:16:59 +0000
committeruau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-27 01:16:59 +0000
commit5074d4728f70f7a532a53067a2eaa5cd141a2d4b (patch)
treefcc6899afa0d936d885168e9bf4953dcd1487003 /mplayer.c
parente3b192992593030bc0280dbf913b081fe7cd5b0f (diff)
downloadmpv-5074d4728f70f7a532a53067a2eaa5cd141a2d4b.tar.bz2
mpv-5074d4728f70f7a532a53067a2eaa5cd141a2d4b.tar.xz
Seek to -ss position without first starting audio/video from the start.
Manual seeks no longer shift -endpos position (hopefully no one considered that a "feature"). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22356 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/mplayer.c b/mplayer.c
index c17d551afa..e9e5dc1ec7 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -3330,6 +3330,17 @@ if(play_n_frames==0){
mpctx->eof=PT_NEXT_ENTRY; goto goto_next_file;
}
+if (seek_to_sec) {
+ seek(mpctx, seek_to_sec, 1);
+ end_at.pos += seek_to_sec;
+}
+
+if (end_at.type == END_AT_SIZE) {
+ mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_MPEndposNoSizeBased);
+ end_at.type = END_AT_NONE;
+}
+
+
while(!mpctx->eof){
float aq_sleep_time=0;
if(!mpctx->sh_audio && mpctx->d_audio->sh) {
@@ -3506,20 +3517,6 @@ if(step_sec>0) {
}
mpctx->was_paused = 0;
- if (seek_to_sec) {
- rel_seek_secs += seek_to_sec;
- seek_to_sec = 0;
- }
-
- if (end_at.type != END_AT_NONE) {
- if(end_at.type == END_AT_SIZE) {
- mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_MPEndposNoSizeBased);
- end_at.type = END_AT_NONE;
- } else {
- end_at.pos += rel_seek_secs;
- }
- }
-
/* Looping. */
if(mpctx->eof==1 && loop_times>=0) {
int l = loop_times;