[vlc] Re: bug in linux_dvb.c with code-rate parameters

Jean-Paul Saman jean-paul.saman at planet.nl
Mon Jun 14 16:53:55 CEST 2004


Guido Flohr wrote:

> Hi,
>
> there is a (fatal!) typo in modules/access/dvb/linux_dvb.c.  In 
> function FrontendSetOFDM():
>
> Index: linux_dvb.c
> ===================================================================
> --- linux_dvb.c (revision 7978)
> +++ linux_dvb.c (working copy)
> @@ -811,9 +812,9 @@
>      fep.inversion = DecodeInversion( p_input );
>
>      fep.u.ofdm.bandwidth = DecodeBandwidth( p_input );
> -    var_Get( p_input, "dvb-code-rate-HP", &val );
> +    var_Get( p_input, "dvb-code-rate-hp", &val );
>      fep.u.ofdm.code_rate_HP = DecodeFEC( p_input, val.i_int );
> -    var_Get( p_input, "dvb-code-rate-LP", &val );
> +    var_Get( p_input, "dvb-code-rate-lp", &val );
>      fep.u.ofdm.code_rate_LP = DecodeFEC( p_input, val.i_int );
>      fep.u.ofdm.constellation = DecodeModulation( p_input );
>      fep.u.ofdm.transmission_mode = DecodeTransmission( p_input );
>
> === end of patch ===
>
> The effect of the typo is that both code_rate_HP and code_rate_LP are 
> always set to FEC_NONE in the frontend parameters for DVB-T cards.  
> When tuning the card you get "dvb input error: argument has invalid 
> FEC (650000000)" (where 650000000 is the frequency you want to tune in).

Just fixed this one. One thing remains here why does it print the 
frequency instead ??

> Alternatively, you could also change the name of the parameters in 
> moduales/access/dvb/access.c, up to you.

The parameters (object variables) names are made consistent VLC's object 
variable code is case-sensitive, thus dvb-code-rate-LP and 
dvb-code-rate-lp are two different objects.

> I would also recommend this change:
>
> Index: linux_dvb.c
> ===================================================================
> --- linux_dvb.c (revision 7978)
> +++ linux_dvb.c (working copy)
> @@ -405,6 +406,7 @@
>
>      switch ( i_val )
>      {
> +       case 0: fe_fec = FEC_NONE; break;
>          case 1: fe_fec = FEC_1_2; break;
>          case 2: fe_fec = FEC_2_3; break;
>          case 3: fe_fec = FEC_3_4; break;
> === end of patch ===
>
> FEC_NONE is a legal value, it should not produce a warning.

You are right, thanks for spotting this.

-- 

Many greetings,
Jean-Paul Saman

Consultant
--------------------------------------------------------------
VLC iPAQ maintainer                    http://www.videolan.org
RedHat Certified Engineer         RHCE number: 807202745005548
--------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20040614/917ccde5/attachment.sig>


More information about the vlc mailing list