[linux-dvb] szap-pmt.diff

Johannes Stezenbach js at linuxtv.org
Tue Jun 14 12:01:28 CEST 2005


On Sun, Jun 12, 2005 at 03:27:31PM +0200, Matthias Mueller wrote:
> On Sun, Jun 12, 2005 at 02:55:41PM +0200, Johannes Stezenbach wrote:
> > On Sat, Jun 11, 2005 at 08:43:33PM +0200, Matthias Mueller wrote:
> > >  static int set_demux(int dmxfd, int pid, int audio, int dvr)
> > >  {
> > >     struct dmx_pes_filter_params pesfilter;
> > >  
> > > -   if (pid <= 0 || pid >= 0x1fff) /* ignore this pid to allow radio services */
> > > +   if (pid < 0 || pid >= 0x1fff) /* ignore this pid to allow radio services */
> > >  	   return TRUE;
> > 
> > Unfortunately there are channels.conf files which
> > use 0 for "no video/audio pid" which is OK since 0 is no valid
> > video/audio pid. You need to handle this in read_channels.
> 
> I had a look at read_channels, my first thought was changing vpid/apid to
> -1 if they are 0, but vpid/apid are declared as unsigned int. Is it safe,
> to change them to signed int?

I fixed it up by assigning 0x1fff to invalid pids in read_channels().
I also added minor whitespace.

Comitted to CVS.

Thanks,
Johannes




More information about the linux-dvb mailing list