[vlc-devel] [PATCH] DVB-S scanning support
Rémi Denis-Courmont
remi at remlab.net
Mon Aug 2 14:20:06 CEST 2010
On Mon, 2 Aug 2010 13:21:40 +0300, David Kaplan <david at 2of1.org> wrote:
> +#define SATELLITE_TEXT N_("Satellite scanning config")
> +#define SATELLITE_LONGTEXT N_("filename of config file in
> share/dvb/dvb-s")
Beats me why you need a configuration item for this. Beats even harder how
Joe Average User would know (to set) the right value.
> -#define DVB_SCAN_MAX_SIGNAL_TIME (300*1000)
> +#define DVB_SCAN_MAX_SIGNAL_TIME (1000*1000)
> #define DVB_SCAN_MAX_LOCK_TIME (5000*1000)
> -#define DVB_SCAN_MAX_PROBE_TIME (30000*1000)
> +#define DVB_SCAN_MAX_PROBE_TIME (45000*1000)
Undocumented and seemingly unrelated change.
> + if( p_scan->parameter.type == SCAN_DVB_S )
> + /* set satellite config file path */
> + strncpy( p_scan->parameter.sat_info.psz_name,
> + var_GetString( p_access, "dvb-satellite" ),
> + sizeof(p_scan->parameter.sat_info.psz_name) );
Memory leak.
> +#define GET_OPTION_STRING( option )
> \
> + if ( !strncmp( psz_parser, option "=", strlen( option "=" ) ) )
> \
> + {
> \
> + psz_parser += strlen( option "=" );
> \
> + val.psz_string = psz_parser;
> \
> + char *tok = strtok(val.psz_string, ":");
IIRC not thread-safe. Consider using strtok_r or something else.
--
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis
More information about the vlc-devel
mailing list