diff options
author | Andreas Oberritter <devnull@localhost> | 2004-01-14 21:07:34 +0000 |
---|---|---|
committer | Andreas Oberritter <devnull@localhost> | 2004-01-14 21:07:34 +0000 |
commit | 89d39d7ea0a4d7222704a380c6330ea9d0c47780 (patch) | |
tree | 54d2ef33918fa323bded75d44314d8b7de189f25 /linux/drivers/media/dvb/dvb-core | |
parent | 08b9a6d74ea0b8105936ccfbb8265b1bda5867f4 (diff) | |
download | mediapointer-dvb-s2-89d39d7ea0a4d7222704a380c6330ea9d0c47780.tar.gz mediapointer-dvb-s2-89d39d7ea0a4d7222704a380c6330ea9d0c47780.tar.bz2 |
corrected bug in dvb_demux.c:1.44->1.45:
(e.g. starting a ts filter on a running section filter's pid did break the section filter)
Diffstat (limited to 'linux/drivers/media/dvb/dvb-core')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_demux.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_demux.c b/linux/drivers/media/dvb/dvb-core/dvb_demux.c index cea42769e..bbd18db2c 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_demux.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_demux.c @@ -397,6 +397,11 @@ static inline void dvb_dmx_swfilter_packet_type(struct dvb_demux_feed *feed, con } } +#define DVR_FEED(f) \ + (((f)->type == DMX_TYPE_TS) && \ + ((f)->feed.ts.is_filtering) && \ + (((f)->ts_type & (TS_PACKET|TS_PAYLOAD_ONLY)) == TS_PACKET)) + void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf) { struct dvb_demux_feed *feed; @@ -406,16 +411,21 @@ void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf) list_for_each(pos, head) { feed = list_entry(pos, struct dvb_demux_feed, list_head); + + if ((feed->pid != pid) && (feed->pid != 0x2000)) + continue; + + /* copy each packet only once to the dvr device, even + * if a PID is in multiple filters (e.g. video + PCR) */ + if ((DVR_FEED(feed)) && (dvr_done++)) + continue; + if (feed->pid == pid) { - /* copy each packet only once to the dvr device, even - * if a PID is in multiple filters (e.g. video + PCR) */ - if (!dvr_done) { - dvb_dmx_swfilter_packet_type (feed, buf); - if ((feed->ts_type & TS_PACKET) && - !(feed->ts_type & TS_PAYLOAD_ONLY)) - dvr_done = 1; - } + dvb_dmx_swfilter_packet_type(feed, buf); + if (DVR_FEED(feed)) + continue; } + if (feed->pid == 0x2000) feed->cb.ts(buf, 188, 0, 0, &feed->feed.ts, DMX_OK); } |