summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-08-07 09:53:59 +0000
committerben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-08-07 09:53:59 +0000
commitdba246199c20857d29a08bf176003b58736da31c (patch)
tree33aa00fec3147def25446207079946448db86174
parent141e81cce4fb780a1e2f791c79c1664956401af7 (diff)
downloadmpv-dba246199c20857d29a08bf176003b58736da31c.tar.bz2
mpv-dba246199c20857d29a08bf176003b58736da31c.tar.xz
Fix wrong behavior with slave command by going back to the starting point
of the play_tree to pop all existing configurations. Patch by Mathieu Schroeter <mathieu dot schroeter at gamesover dot ch>. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27424 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/command.c b/command.c
index 2870a10faa..1d6c89cd29 100644
--- a/command.c
+++ b/command.c
@@ -2655,6 +2655,10 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd)
break;
case MP_CMD_STOP:
+ // Go back to the starting point.
+ while (play_tree_iter_up_step
+ (mpctx->playtree_iter, 0, 1) != PLAY_TREE_ITER_END)
+ /* NOP */ ;
mpctx->eof = PT_STOP;
brk_cmd = 1;
break;