From f4966c6d0360ca710d2d5fa52c689d1981369e94 Mon Sep 17 00:00:00 2001 From: Johannes Stezenbach Date: Fri, 19 Sep 2003 17:23:40 +0000 Subject: patch by Jon Burgess: Reduce the number of dropped TS packets when an error is detected. --- linux/drivers/media/dvb/dvb-core/dvb_demux.c | 4 +++- linux/drivers/media/dvb/ttpci/budget-core.c | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'linux') diff --git a/linux/drivers/media/dvb/dvb-core/dvb_demux.c b/linux/drivers/media/dvb/dvb-core/dvb_demux.c index 625f41c05..586a88f5b 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_demux.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_demux.c @@ -393,7 +393,9 @@ void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf, size_t cou spin_lock(&demux->lock); while (count--) { - dvb_dmx_swfilter_packet(demux, buf); + if(buf[0] == 0x47) { + dvb_dmx_swfilter_packet(demux, buf); + } buf += 188; } diff --git a/linux/drivers/media/dvb/ttpci/budget-core.c b/linux/drivers/media/dvb/ttpci/budget-core.c index 98e0387f1..df1df95b4 100644 --- a/linux/drivers/media/dvb/ttpci/budget-core.c +++ b/linux/drivers/media/dvb/ttpci/budget-core.c @@ -80,14 +80,11 @@ static void vpeirq (unsigned long data) return; if (newdma > olddma) { /* no wraparound, dump olddma..newdma */ - if(mem[olddma] == 0x47) dvb_dmx_swfilter_packets(&budget->demux, mem+olddma, (newdma-olddma) / 188); } else { /* wraparound, dump olddma..buflen and 0..newdma */ - if(mem[olddma] == 0x47) dvb_dmx_swfilter_packets(&budget->demux, mem+olddma, (TS_BUFLEN-olddma) / 188); - if(mem[0] == 0x47) dvb_dmx_swfilter_packets(&budget->demux, mem, newdma / 188); } -- cgit v1.2.3