[vlc-devel] [PATCH] DVB-S scanning support

David Kaplan david at 2of1.org
Mon Aug 2 14:41:00 CEST 2010


2010/8/2 Rémi Denis-Courmont <remi at remlab.net>

>
> 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.
>

Well there needs to be some way of selecting the config file for the
relevant satellite.

I agree that average Joe wouldn't know what to put here - but then he
wouldn't know what to put for most of the (currently) confusing options.

As part of the interface improvements I'm planning, I hope to provide a drop
down list in a proper 'Scan' dialog.
But for now I think I need this option. Unless there's some other way I
should be handling this?


> > -#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.
>

Will split out into a separate patch.


>
> > +    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.
>

Where's it leaking? .psz_name is allocated on the heap.


>
> > +#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.
>

Indeed. WIll fix.


>
> --
> Rémi Denis-Courmont
> http://www.remlab.net
> http://fi.linkedin.com/in/remidenis
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>



-- 
http://blog.2of1.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100802/3c084168/attachment.html>


More information about the vlc-devel mailing list