# HG changeset patch # User alex # Date 1049904465 0 # Node ID 9dc39697e3b39cb942893acc359a966a5f7a780b # Parent 9f3e8c42a7cbbd0602906f04bea24fa84765a978 channel finetuning cmdline support, patch by Ivan Szanto diff -r 9f3e8c42a7cb -r 9dc39697e3b3 libmpdemux/tv.c --- a/libmpdemux/tv.c Wed Apr 09 15:51:37 2003 +0000 +++ b/libmpdemux/tv.c Wed Apr 09 16:07:45 2003 +0000 @@ -298,6 +298,17 @@ if (tv_channel_current->freq == 0) mp_msg(MSGT_TV, MSGL_ERR, "Couldn't find frequency for channel %s (%s)\n", tv_channel_current->number, tv_channel_current->name); + else { + sep = strchr(tv_channel_current->name, '-'); + if ( !sep ) sep = strchr(tv_channel_current->name, '+'); + + if ( sep ) { + i = atoi (sep+1); + if ( sep[0] == '+' ) tv_channel_current->freq += i * 100; + if ( sep[0] == '-' ) tv_channel_current->freq -= i * 100; + sep[0] = '\0'; + } + } /*mp_msg(MSGT_TV, MSGL_INFO, "-- Detected channel %s - %s (%5.3f)\n", tv_channel_current->number, tv_channel_current->name,