[linux-dvb] section demux bug

Andrew de Quincey adq_dvb at lidskialf.net
Thu Nov 10 11:42:44 CET 2005


On Thursday 10 Nov 2005 10:26, Mws wrote:
> On Thursday 10 November 2005 10:25, Andrew de Quincey wrote:
> > Hi, I was investigating the section demux code and I think  spotted a
> > bug... patch attached for review before I check it in:
> >
> > --- linux/drivers/media/dvb/dvb-core/dvb_demux.c        27 Oct 2005
> > 21:03:39 -0000      1.70
> > +++ linux/drivers/media/dvb/dvb-core/dvb_demux.c        10 Nov 2005
> > 09:22:35 -0000
> > @@ -118,7 +118,7 @@
> >         int i;
> >
> >         for (i = 0; i < DVB_DEMUX_MASK_MAX; i++) {
> > -               u8 xor = f->filter.filter_value[i] ^
> > feed->feed.sec.secbuf[i]; +               u8 xor =
> > f->filter.filter_value[i] ^ feed->feed.sec.secbuf[0];
> >
> >                 if (f->maskandmode[i] & xor)
> >                         return 0;
> >
> > I think its meant to be comparing the table ID of the section with the
> > value in each of the possible filters - i.e. it should always read from
> > secbuf[0].
> >
> > _______________________________________________
> > linux-dvb mailing list
> > linux-dvb at linuxtv.org
> > http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
>
> hi andrew,
>
> this is the normal check for have all of the filter values compared with
> the actual section that is receveid.
>
> e.g.
> filtering on pid 0011
> 42 00 02 01 00 00 00 85 00 00 00 00 00 00 00 00
> FF  FF FF 01 00 00 FF  FF 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>
> this is actually checking for
> Table ID 42 SDT Actual Transport Stream
> Transport Stream ID 0x0002
> currentNextIndicator 0x01
> and the ONID 0x0085
>
> each of the filter values carries it's own Mask and negfilter value.
> thus _each_ of these 16 values has to be compared within the loop,
> if the wanted filter values do match.

Ta - I'd always wondered exactly why there were 16 table id filters. It all 
makes perfect sense now. :)



More information about the linux-dvb mailing list