summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-core
diff options
context:
space:
mode:
authorAlex Woods <devnull@localhost>2003-12-08 22:22:36 +0000
committerAlex Woods <devnull@localhost>2003-12-08 22:22:36 +0000
commit5a0bc5c4040cc9d61a261137d0cf796885afa9dc (patch)
tree760bbbbd32dadadeeb23d15363d3a963abc04739 /linux/drivers/media/dvb/dvb-core
parentcd163e5d563ca92b425feb1e3544f8eece8719e2 (diff)
downloadmediapointer-dvb-s2-5a0bc5c4040cc9d61a261137d0cf796885afa9dc.tar.gz
mediapointer-dvb-s2-5a0bc5c4040cc9d61a261137d0cf796885afa9dc.tar.bz2
Add a parameter to dvb_filter_pes2ts function to specify whether the packet
is a payload unit start or not.
Diffstat (limited to 'linux/drivers/media/dvb/dvb-core')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_filter.c10
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_filter.h3
2 files changed, 9 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_filter.c b/linux/drivers/media/dvb/dvb-core/dvb_filter.c
index a9e81251a..760df8e7a 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_filter.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_filter.c
@@ -564,14 +564,18 @@ void dvb_filter_pes2ts_init(struct dvb_filter_pes2ts *p2ts, unsigned short pid,
p2ts->priv=priv;
}
-int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes, int len)
+int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes,
+ int len, int payload_start)
{
unsigned char *buf=p2ts->buf;
int ret=0, rest;
-
+
//len=6+((pes[4]<<8)|pes[5]);
- buf[1]|=0x40;
+ if (payload_start)
+ buf[1]|=0x40;
+ else
+ buf[1]&=~0x40;
while (len>=184) {
buf[3]=0x10|((p2ts->cc++)&0x0f);
memcpy(buf+4, pes, 184);
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_filter.h b/linux/drivers/media/dvb/dvb-core/dvb_filter.h
index f792280bd..bd328dc25 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_filter.h
+++ b/linux/drivers/media/dvb/dvb-core/dvb_filter.h
@@ -37,7 +37,8 @@ struct dvb_filter_pes2ts {
void dvb_filter_pes2ts_init(struct dvb_filter_pes2ts *p2ts, unsigned short pid,
dvb_filter_pes2ts_cb_t *cb, void *priv);
-int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes, int len);
+int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes,
+ int len, int payload_start);
#define PROG_STREAM_MAP 0xBC