From: Darren S. <ds...@us...> - 2005-01-19 00:52:01
|
Update of /cvsroot/xine/gnome-xine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21412/src Modified Files: player.c Log Message: Handle idle state as well as stopped state "just in case". Index: player.c =================================================================== RCS file: /cvsroot/xine/gnome-xine/src/player.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- player.c 12 Jan 2005 00:26:33 -0000 1.27 +++ player.c 19 Jan 2005 00:51:49 -0000 1.28 @@ -831,24 +831,26 @@ item = playlist_get_item (playlist_get_list_pos()); if (item) { - if (xine_get_status (stream) == XINE_STATUS_STOP) { - + switch (xine_get_status (stream)) + { + case XINE_STATUS_STOP: + case XINE_STATUS_IDLE: if (pos<0) pos = 0; if (pos_time<0) pos_time = item->start_time; - playlist_play_from (playlist_get_list_pos(), pos, pos_time); - } else { - - if ( (pos>=0) || (pos_time>=0) ) { - + break; + default: + if ( (pos>=0) || (pos_time>=0) ) + { if (pos<0) pos = 0; if (pos_time<0) pos_time = 0; xine_play (stream, pos, pos_time); } + break; } } else printf (_("script_engine: error, no valid play item available\n")); @@ -879,10 +881,14 @@ se_arg_is_int (0, "play_pause"); } - if (xine_get_status (stream) == XINE_STATUS_STOP) + switch (xine_get_status (stream)) + { + case XINE_STATUS_STOP: + case XINE_STATUS_IDLE: return controls_play (cx, obj, 0, 0, rval); - - return controls_pause (cx, obj, argc, argv, rval); + default: + return controls_pause (cx, obj, argc, argv, rval); + } } static JSBool js_is_live_stream (JSContext *cx, JSObject *obj, uintN argc, |