From 44aeed4643aca71e93417e5805e0716623b5557e Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 9 Apr 2003 16:07:45 +0000 Subject: [PATCH] channel finetuning cmdline support, patch by Ivan Szanto git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9890 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/tv.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libmpdemux/tv.c b/libmpdemux/tv.c index 5a173d29f4..e4419eb775 100644 --- a/libmpdemux/tv.c +++ b/libmpdemux/tv.c @@ -298,6 +298,17 @@ static int open_tv(tvi_handle_t *tvh) 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,