changeset 17979:392c7c1b8ccc

Fix stepping in the playtree when interupting libmpdemux. Thanks to Jonas Jermann for the report.
author albeu
date Mon, 27 Mar 2006 18:33:23 +0000
parents d026c9bb2938
children 05b65e0b8d6f
files mplayer.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Mon Mar 27 18:31:04 2006 +0000
+++ b/mplayer.c	Mon Mar 27 18:33:23 2006 +0000
@@ -131,6 +131,7 @@
 
 play_tree_t* playtree;
 play_tree_iter_t* playtree_iter = NULL;
+static int play_tree_step = 1;
 
 #define PT_NEXT_ENTRY 1
 #define PT_PREV_ENTRY -1
@@ -716,6 +717,7 @@
 	 exit_player_with_rc(MSGTR_Exit_quit, (cmd->nargs > 0)? cmd->args[0].v.i : 0);
        case MP_CMD_PLAY_TREE_STEP: {
 	 eof = (cmd->args[0].v.i > 0) ? PT_NEXT_ENTRY : PT_PREV_ENTRY;
+	 play_tree_step = (cmd->args[0].v.i == 0) ? 1 : cmd->args[0].v.i;
        } break;
        case MP_CMD_PLAY_TREE_UP_STEP: {
 	 eof = (cmd->args[0].v.i > 0) ? PT_UP_NEXT : PT_UP_PREV;
@@ -769,8 +771,6 @@
   return PT_NEXT_SRC;
 }
 
-static int play_tree_step = 1;
-
 int sub_source(void)
 {
     int source = -1;