From 03d71f6817458ea28f4530132e4e7ad753707d80 Mon Sep 17 00:00:00 2001 From: albeu Date: Mon, 27 Mar 2006 18:33:23 +0000 Subject: Fix stepping in the playtree when interupting libmpdemux. Thanks to Jonas Jermann for the report. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17980 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index 88158b5769..a205ee26b8 100644 --- a/mplayer.c +++ b/mplayer.c @@ -131,6 +131,7 @@ extern int import_initial_playtree_into_gui(play_tree_t* my_playtree, m_config_t 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 @@ static int libmpdemux_was_interrupted(int eof) { 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 @@ int playtree_add_playlist(play_tree_t* entry) return PT_NEXT_SRC; } -static int play_tree_step = 1; - int sub_source(void) { int source = -1; -- cgit v1.2.3