[vlc-devel] commit: dvb-c: somewhat working channel-scanning in linux (Ilkka Ollakka )
jpd at videolan.org
jpd at videolan.org
Fri Jul 31 13:10:58 CEST 2009
On Fri, Jul 31, 2009 at 01:02:57PM +0200, git version control wrote:
> vlc | branch: 1.0-bugfix | Ilkka Ollakka <ileoo at videolan.org> | Thu Jul 30 13:56:45 2009 +0300| [df112b4bde8cdbd1fec4fcccaa11e02360279d93] | committer: Ilkka Ollakka
>
> dvb-c: somewhat working channel-scanning in linux
I'm sorry, but why is this on bugfix and not master?
> + static int frequencies[] = {
A const would be nice.
> + if( p_scan->i_index < (sizeof(frequencies)/sizeof(int)) )
> {
> - p_cfg->i_frequency = 13800000 + ( ( p_scan->i_index - (72 + 21 ) ) * 800000);
> + p_cfg->i_frequency = 1000000 * ( frequencies[ p_scan->i_index ] );
I'd be inclined to pre-multiply as the frequencies are stored as int
(could be unsigned) anyway, saving some multiplications. Minor nit.
> + *pf_pos = (double)p_scan->i_index / (sizeof(frequencies)/sizeof(int));
Add an enum num_frequencies since you're using it twice anyway.
More information about the vlc-devel
mailing list