[MPlayer-cvslog] r19094 - trunk/libmpdemux/dvbin.c

nicodvb subversion at mplayerhq.hu
Sat Jul 15 00:37:54 CEST 2006


Author: nicodvb
Date: Sat Jul 15 00:37:54 2006
New Revision: 19094

Modified:
   trunk/libmpdemux/dvbin.c

Log:
simplification in dvb_step_channel

Modified: trunk/libmpdemux/dvbin.c
==============================================================================
--- trunk/libmpdemux/dvbin.c	(original)
+++ trunk/libmpdemux/dvbin.c	Sat Jul 15 00:37:54 2006
@@ -601,21 +601,7 @@
 		return 0;
 	}
 
-
-	if(dir == DVB_CHANNEL_HIGHER)
-	{
-		if(list->current == list->NUM_CHANNELS-1)
-			new_current=0;
-		else
-			new_current = list->current + 1;
-	}
-	else
-	{
-		if(list->current == 0)
-			new_current=list->NUM_CHANNELS-1;
-		else
-			new_current = list->current - 1;
-	}
+	new_current = (list->NUM_CHANNELS + list->current + (dir == DVB_CHANNEL_HIGHER ? 1 : -1)) % list->NUM_CHANNELS;
 
 	return dvb_set_channel(priv, priv->card, new_current);
 }



More information about the MPlayer-cvslog mailing list