diff options
author | Johannes Stezenbach <devnull@localhost> | 2003-10-09 12:13:49 +0000 |
---|---|---|
committer | Johannes Stezenbach <devnull@localhost> | 2003-10-09 12:13:49 +0000 |
commit | 11a753d2412b7b2c69a3c030ae3105ea8533a9e8 (patch) | |
tree | 696777de0a8ab3139a0af8500d5ae4074f8927fb | |
parent | 42dd92758db3261aba3da6f42db85857b459335c (diff) | |
download | mediapointer-dvb-s2-11a753d2412b7b2c69a3c030ae3105ea8533a9e8.tar.gz mediapointer-dvb-s2-11a753d2412b7b2c69a3c030ae3105ea8533a9e8.tar.bz2 |
dvb_dmx_swfilter_section_feed: check CRC only when
section_syntax_indicator is set (to match hardware
demux behaviour)
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_demux.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_demux.c b/linux/drivers/media/dvb/dvb-core/dvb_demux.c index 586a88f5b..29108599d 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_demux.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_demux.c @@ -190,6 +190,7 @@ static inline int dvb_dmx_swfilter_section_feed (struct dvb_demux_feed *feed) struct dvb_demux_filter *f = feed->filter; struct dmx_section_feed *sec = &feed->feed.sec; u8 *buf = sec->secbuf; + int section_syntax_indicator; if (sec->secbufp != sec->seclen) return -1; @@ -200,8 +201,12 @@ static inline int dvb_dmx_swfilter_section_feed (struct dvb_demux_feed *feed) if (!f) return 0; - if (sec->check_crc && demux->check_crc32(feed, sec->secbuf, sec->seclen)) - return -1; + if (sec->check_crc) { + section_syntax_indicator = ((sec->secbuf[1] & 0x80) != 0); + if (section_syntax_indicator && + demux->check_crc32(feed, sec->secbuf, sec->seclen)) + return -1; + } do { if (dvb_dmx_swfilter_sectionfilter(feed, f) < 0) |