diff -Naur main/mplayer.c main-new/mplayer.c --- main/mplayer.c 2003-08-18 16:05:30.000000000 +0200 +++ main-new/mplayer.c 2003-08-23 16:08:59.000000000 +0200 @@ -100,6 +100,7 @@ #ifdef HAS_DVBIN_SUPPORT #include "libmpdemux/dvbin.h" +static int last_dvb_step = 1; #endif @@ -1532,6 +1533,27 @@ if(!sh_video && !sh_audio){ mp_msg(MSGT_CPLAYER,MSGL_FATAL, MSGTR_NoStreamFound); +#ifdef HAS_DVBIN_SUPPORT + if((stream->type == STREAMTYPE_DVB) && stream->priv) + { + dvb_priv_t *priv = (dvb_priv_t*) stream->priv; + if(priv->is_on) + { + int dir; + int v = last_dvb_step; + if(v > 0) + dir = DVB_CHANNEL_HIGHER; + else + dir = DVB_CHANNEL_LOWER; + + if(dvb_step_channel(priv, dir)) + { + uninit_player(INITED_ALL-(INITED_STREAM)); + goto goto_open_demuxer; + } + } + } +#endif goto goto_next_file; // exit_player(MSGTR_Exit_error); } @@ -2868,7 +2890,8 @@ { int dir; int v = cmd->args[0].v.i; - + + last_dvb_step = v; if(v > 0) dir = DVB_CHANNEL_HIGHER; else @@ -2904,6 +2927,11 @@ dvb_priv_t *priv = (dvb_priv_t*) stream->priv; if(priv->is_on) { + if(priv->list->current <= cmd->args[0].v.i) + last_dvb_step = 1; + else + last_dvb_step = -1; + if(dvb_set_channel(priv, cmd->args[0].v.i)) { uninit_player(INITED_ALL-(INITED_STREAM));