[Mplayer-cvslog] CVS: main mplayer.c,1.723,1.724
Alex Beregszaszi
alex at mplayerhq.hu
Wed Aug 27 19:09:30 CEST 2003
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv2630
Modified Files:
mplayer.c
Log Message:
This patch fixes:
1) if channels (in the list) are invalid excludes them
2) on encrypted/unreadable channels mplayer goes to the next/previous
3) when changing channel uninit all components but stream and input.
Nico <nsabbi at libero.it>
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.723
retrieving revision 1.724
diff -u -r1.723 -r1.724
--- mplayer.c 27 Aug 2003 16:44:09 -0000 1.723
+++ mplayer.c 27 Aug 2003 17:08:24 -0000 1.724
@@ -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|INITED_INPUT));
+ 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|INITED_INPUT));
More information about the MPlayer-cvslog
mailing list