summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2004-01-12 14:14:59 +0000
committerMichael Hunold <devnull@localhost>2004-01-12 14:14:59 +0000
commitd451c42a3fd22b92c5f562c7f60a95f61fa744fc (patch)
tree84305f4b1f12f9b15979fecde80c5250d921a979 /linux/drivers
parentfc767c03efb63f2b1ad11d143bbe033a551250f5 (diff)
downloadmediapointer-dvb-s2-d451c42a3fd22b92c5f562c7f60a95f61fa744fc.tar.gz
mediapointer-dvb-s2-d451c42a3fd22b92c5f562c7f60a95f61fa744fc.tar.bz2
- copy each packet only once to the dvr device, even if a PID is in multiple filters (e.g. video + PCR) (fix by Johannes)
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_demux.c15
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);