[Mplayer-cvslog] CVS: main mplayer.c,1.705,1.706
Alban Bedel CVS
albeu at mplayerhq.hu
Fri Jul 11 09:55:20 CEST 2003
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv28966
Modified Files:
mplayer.c
Log Message:
Commands are read in a loop, but for some commands we need to break
the loop to finish processing the command. Otherwise some commands
may appears as skiped to the user.
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.705
retrieving revision 1.706
diff -u -r1.705 -r1.706
--- mplayer.c 9 Jul 2003 01:29:45 -0000 1.705
+++ mplayer.c 11 Jul 2003 07:54:52 -0000 1.706
@@ -2423,7 +2423,8 @@
{
mp_cmd_t* cmd;
- while( (cmd = mp_input_get_cmd(0,0)) != NULL) {
+ int brk_cmd = 0;
+ while( !brk_cmd && (cmd = mp_input_get_cmd(0,0)) != NULL) {
switch(cmd->id) {
case MP_CMD_SEEK : {
int v,abs;
@@ -2447,6 +2448,7 @@
rel_seek_secs+= v;
osd_function= (v > 0) ? OSD_FFW : OSD_REW;
}
+ brk_cmd = 1;
} break;
#ifdef USE_EDL
case MP_CMD_EDL_MARK:
@@ -2464,6 +2466,7 @@
} break;
case MP_CMD_PAUSE : {
osd_function=OSD_PAUSE;
+ brk_cmd = 1;
} break;
case MP_CMD_QUIT : {
exit_player_with_rc(MSGTR_Exit_quit, 0);
@@ -2497,6 +2500,7 @@
eof = (n > 0) ? PT_NEXT_ENTRY : PT_PREV_ENTRY;
if(eof)
play_tree_step = n;
+ brk_cmd = 1;
}
} break;
case MP_CMD_PLAY_TREE_UP_STEP : {
@@ -2510,6 +2514,7 @@
play_tree_iter_free(i);
} else
eof = (n > 0) ? PT_UP_NEXT : PT_UP_PREV;
+ brk_cmd = 1;
} break;
case MP_CMD_PLAY_ALT_SRC_STEP : {
if(playtree_iter && playtree_iter->num_files > 1) {
@@ -2519,6 +2524,7 @@
else if(v < 0 && playtree_iter->file > 1)
eof = PT_PREV_SRC;
}
+ brk_cmd = 1;
} break;
case MP_CMD_SUB_DELAY : {
int abs= cmd->args[1].v.i;
@@ -2589,6 +2595,7 @@
play_tree_set_child(playtree,e);
play_tree_iter_step(playtree_iter,0,0);
eof = PT_NEXT_SRC;
+ brk_cmd = 1;
} break;
case MP_CMD_LOADLIST : {
play_tree_t* e = parse_playlist_file(cmd->args[0].v.s);
@@ -2603,6 +2610,7 @@
play_tree_iter_step(playtree_iter,0,0);
eof = PT_NEXT_SRC;
}
+ brk_cmd = 1;
} break;
case MP_CMD_GAMMA : {
int v = cmd->args[0].v.i, abs = cmd->args[1].v.i;
More information about the MPlayer-cvslog
mailing list