[Mplayer-cvslog] CVS: main mplayer.c,1.300,1.301 cfg-mplayer.h,1.91,1.92

Arpi of Ize arpi at mplayer.dev.hu
Mon Oct 22 16:43:05 CEST 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv11858

Modified Files:
	mplayer.c cfg-mplayer.h 
Log Message:
-loop patch by Pascal Haakmat <a.haakmat at chello.nl>

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.300
retrieving revision 1.301
diff -u -r1.300 -r1.301
--- mplayer.c	21 Oct 2001 23:05:05 -0000	1.300
+++ mplayer.c	22 Oct 2001 14:42:47 -0000	1.301
@@ -186,6 +186,7 @@
 char *seek_to_sec=NULL;
 off_t seek_to_byte=0;
 int has_audio=1;
+int loop_times=-1;
 
 char *audio_codec=NULL; // override audio codec
 char *video_codec=NULL; // override video codec
@@ -1848,6 +1849,25 @@
      seek_to_sec = NULL;
   }
   
+  /* Looping. */
+  if(eof==5 && loop_times>-1) {
+
+    if(loop_times!=0) {
+      
+      loop_times--;
+      
+      if(loop_times==0)
+        loop_times=-1;
+      
+    }
+    
+    eof=0;
+    abs_seek_pos=1;
+
+    mp_msg(MSGT_CPLAYER,MSGL_V,"loop_times = %d, eof = 0\n", loop_times);
+    
+  }
+
 if(rel_seek_secs || abs_seek_pos){
   current_module="seek";
   if(demux_seek(demuxer,rel_seek_secs,abs_seek_pos)){

Index: cfg-mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- cfg-mplayer.h	21 Oct 2001 18:50:15 -0000	1.91
+++ cfg-mplayer.h	22 Oct 2001 14:42:47 -0000	1.92
@@ -153,6 +153,7 @@
 	{"nobg", &play_in_bg, CONF_TYPE_FLAG, 0, 1, 0},
 	{"sb", &seek_to_byte, CONF_TYPE_INT, CONF_MIN, 0, 0},
 	{"ss", &seek_to_sec, CONF_TYPE_STRING, CONF_MIN, 0, 0},
+	{"loop", &loop_times, CONF_TYPE_INT, CONF_RANGE, -1, 10000},
 	{"sound", &has_audio, CONF_TYPE_FLAG, 0, 0, 1},
 	{"nosound", &has_audio, CONF_TYPE_FLAG, 0, 1, 0},
 	{"abs", &ao_buffersize, CONF_TYPE_INT, CONF_MIN, 0, 0},




More information about the MPlayer-cvslog mailing list