[MPlayer-cvslog] r22637 - in trunk: DOCS/man/en/mplayer.1 stream/tv.c
voroshil
subversion at mplayerhq.hu
Fri Mar 16 20:42:41 CET 2007
Author: voroshil
Date: Fri Mar 16 20:42:41 2007
New Revision: 22637
Modified:
trunk/stream/tv.c
Changes in other areas also in this revision:
Modified:
trunk/DOCS/man/en/mplayer.1
Log:
Allow to specify frequencies in channels option.
Modified: trunk/stream/tv.c
==============================================================================
--- trunk/stream/tv.c (original)
+++ trunk/stream/tv.c Fri Mar 16 20:42:41 2007
@@ -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);
More information about the MPlayer-cvslog
mailing list