[linux-dvb] section demux bug

Mws mws at twisted-brains.org
Thu Nov 10 11:26:29 CET 2005


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.

regards
marcel




-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20051110/73ff0a7a/attachment.pgp


More information about the linux-dvb mailing list