[MPlayer-cvslog] r22356 - trunk/mplayer.c

uau subversion at mplayerhq.hu
Tue Feb 27 02:17:00 CET 2007


Author: uau
Date: Tue Feb 27 02:16:59 2007
New Revision: 22356

Modified:
   trunk/mplayer.c

Log:
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").


Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Tue Feb 27 02:16:59 2007
@@ -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;



More information about the MPlayer-cvslog mailing list