diff options
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_demux.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_demux.c b/linux/drivers/media/dvb/dvb-core/dvb_demux.c index 7eec1a45a..cea42769e 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_demux.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_demux.c @@ -397,23 +397,30 @@ static inline void dvb_dmx_swfilter_packet_type(struct dvb_demux_feed *feed, con } } - void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf) { struct dvb_demux_feed *feed; struct list_head *pos, *head=&demux->feed_list; u16 pid = ts_pid(buf); + int dvr_done = 0; list_for_each(pos, head) { feed = list_entry(pos, struct dvb_demux_feed, list_head); - if (feed->pid == pid) - dvb_dmx_swfilter_packet_type (feed, buf); + 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; + } + } if (feed->pid == 0x2000) feed->cb.ts(buf, 188, 0, 0, &feed->feed.ts, DMX_OK); } } - void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf, size_t count) { spin_lock(&demux->lock); |