From: Guenter B. <gu...@us...> - 2003-03-02 20:17:56
|
Update of /cvsroot/xine/gnome-xine/src In directory sc8-pr-cvs1:/tmp/cvs-serv4060/src Modified Files: playlist.c script_engine.c Log Message: fix segfault on play attempt when ran over playlist end Index: playlist.c =================================================================== RCS file: /cvsroot/xine/gnome-xine/src/playlist.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- playlist.c 2 Mar 2003 12:49:32 -0000 1.56 +++ playlist.c 2 Mar 2003 20:17:52 -0000 1.57 @@ -1337,8 +1337,10 @@ item->played = 1; playlist_play (cur_list_pos); - } else + } else { + cur_list_pos = 0; playlist_logo (); + } } static void xine_event_cb (void *user_data, const xine_event_t *event) { Index: script_engine.c =================================================================== RCS file: /cvsroot/xine/gnome-xine/src/script_engine.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- script_engine.c 28 Feb 2003 00:06:59 -0000 1.13 +++ script_engine.c 2 Mar 2003 20:17:53 -0000 1.14 @@ -328,25 +328,29 @@ play_item_t *item; item = playlist_get_item (playlist_get_list_pos()); - if (gtk_xine_get_status (GTK_XINE(gtx)) == XINE_STATUS_STOP) { - 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) ) { + if (item) { + if (gtk_xine_get_status (GTK_XINE(gtx)) == XINE_STATUS_STOP) { if (pos<0) pos = 0; if (pos_time<0) - pos_time = 0; - gtk_xine_play (GTK_XINE (gtx), pos, pos_time); + pos_time = item->start_time; + + playlist_play_from (playlist_get_list_pos(), pos, pos_time); + } else { + + if ( (pos>0) || (pos_time>0) ) { + + if (pos<0) + pos = 0; + if (pos_time<0) + pos_time = 0; + gtk_xine_play (GTK_XINE (gtx), pos, pos_time); + } } - } + } else + printf ("script_engine: error, no valid play item available\n"); } if (gtk_xine_get_param (GTK_XINE(gtx), XINE_PARAM_SPEED) == XINE_SPEED_PAUSE) { |