[MPlayer-dev-eng] [PATCH] fixing loop with shuffle
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Oct 19 22:21:13 CEST 2004
Hi,
the attached patch should make -loop work with -shuffle, although it
can't take full advantage of the playtree structure (loop count is the
same for all files).
Greetings,
Reimar Döffinger
-------------- next part --------------
--- playtree.c 2004-06-26 21:34:50.000000000 +0200
+++ playtree.c 2004-10-19 21:55:02.205395863 +0200
@@ -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-dev-eng
mailing list