changeset 3540:1bfa5284f160

-loop fixed
author arpi
date Sun, 16 Dec 2001 23:59:13 +0000
parents 70ada7e09a30
children 88ea5b89a09e
files mplayer.c
diffstat 1 files changed, 9 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Sun Dec 16 23:45:49 2001 +0000
+++ b/mplayer.c	Sun Dec 16 23:59:13 2001 +0000
@@ -1814,13 +1814,13 @@
 	if(curr_filename>=num_filenames-1)
 		break;
     case KEY_ENTER: // ESC
-      eof=1;  // jump to next file
+      eof=2;  // jump to next file
       break;
     case '<':
 	if(curr_filename < 1)
 		break;
         curr_filename-=2;
-	eof=1;
+	eof=2;
       break;
     case 'g': grab_frames=2;break;
     // pause
@@ -1994,22 +1994,16 @@
   }
   
   /* Looping. */
-  if(eof==5 && loop_times>-1) {
+  if(eof==1 && loop_times>=0) {
+
+    mp_msg(MSGT_CPLAYER,MSGL_V,"loop_times = %d, eof = %d\n", loop_times,eof);
 
-    if(loop_times!=0) {
-      
-      loop_times--;
-      
-      if(loop_times==0)
-        loop_times=-1;
-      
-    }
-    
+    if(loop_times>1) loop_times--; else
+    if(loop_times==1) loop_times=-1;
+
     eof=0;
-    abs_seek_pos=1;
+    abs_seek_pos=3; rel_seek_secs=0; // seek to start of movie (0%)
 
-    mp_msg(MSGT_CPLAYER,MSGL_V,"loop_times = %d, eof = 0\n", loop_times);
-    
   }
 
 if(rel_seek_secs || abs_seek_pos){