diff options
author | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-16 19:42:41 +0000 |
---|---|---|
committer | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-16 19:42:41 +0000 |
commit | 57ed940858fd06e7a8eb9f9d57113da74d96430d (patch) | |
tree | 69f36643a5add156df70092e08fb67a0b3a0d6e7 /stream | |
parent | d26de3f3527bdb939cd97f53736fee9e4e17c7d6 (diff) | |
download | mpv-57ed940858fd06e7a8eb9f9d57113da74d96430d.tar.bz2 mpv-57ed940858fd06e7a8eb9f9d57113da74d96430d.tar.xz |
Allow to specify frequencies in channels option.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22637 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r-- | stream/tv.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/stream/tv.c b/stream/tv.c index 1a06cb05bc..b3bcc37923 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -361,10 +361,16 @@ static int open_tv(tvi_handle_t *tvh) sizeof(tv_channel_current->name)); sep[0] = '\0'; strncpy(tv_channel_current->number, tmp, 5); + tv_channel_current->number[4]='\0'; while ((sep=strchr(tv_channel_current->name, '_'))) sep[0] = ' '; + // if channel number is a number and larger than 1000 threat it as frequency + // tmp still contain pointer to null-terminated string with channel number here + if (atoi(tmp)>1000){ + tv_channel_current->freq=atoi(tmp); + }else{ tv_channel_current->freq = 0; for (i = 0; i < chanlists[tvh->chanlist].count; i++) { cl = tvh->chanlist_s[i]; @@ -373,6 +379,7 @@ static int open_tv(tvi_handle_t *tvh) break; } } + } 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); |