[Mplayer-cvslog] CVS: main playtree.c,1.21,1.22

Reimar Döffinger CVS syncmail at mplayerhq.hu
Wed Oct 20 19:30:32 CEST 2004


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv4017

Modified Files:
	playtree.c 
Log Message:
fix -loop in combination with -shuffle


Index: playtree.c
===================================================================
RCS file: /cvsroot/mplayer/main/playtree.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- playtree.c	25 Jun 2004 16:49:51 -0000	1.21
+++ playtree.c	20 Oct 2004 17:30:29 -0000	1.22
@@ -585,6 +585,14 @@
   
   if(pt == NULL) { // No next
     // Must we loop?
+    if (iter->mode == PLAY_TREE_ITER_RND) {
+      if (iter->root->loop == 0)
+        return PLAY_TREE_ITER_END;
+      play_tree_unset_flag(iter->root, PLAY_TREE_RND_PLAYED, -1);
+      if (iter->root->loop > 0) iter->root->loop--;
+      // try again
+      return play_tree_iter_step(iter, 0, with_nodes);
+    } else
     if(iter->tree->parent && iter->tree->parent->loop != 0 && ((d > 0 && iter->loop != 0) || ( d < 0 && (iter->loop < 0 || iter->loop < iter->tree->parent->loop) ) ) ) { 
       if(d > 0) { // Go back to the first one
 	for(pt = iter->tree ; pt->prev != NULL; pt = pt->prev)




More information about the MPlayer-cvslog mailing list