diff options
author | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-07-14 22:37:54 +0000 |
---|---|---|
committer | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-07-14 22:37:54 +0000 |
commit | 4182c79ba4296d9d3e827f2d2b4fdab4b5858d46 (patch) | |
tree | 83526a2164279cf3381ec774a10ed03d3d9325fc /libmpdemux | |
parent | 3a07b942ee9a11c5c5bbc602f58af2bd8daa870e (diff) |
simplification in dvb_step_channel
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19094 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/dvbin.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/libmpdemux/dvbin.c b/libmpdemux/dvbin.c index 5ac54ab776..ccb069de71 100644 --- a/libmpdemux/dvbin.c +++ b/libmpdemux/dvbin.c @@ -601,21 +601,7 @@ int dvb_step_channel(dvb_priv_t *priv, int dir) 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); } |