Browse Source

Remove pid parameter from ts_pmt_push_packet()

Georgi Chorbadzhiyski 13 years ago
parent
commit
8802a6043d
2 changed files with 3 additions and 5 deletions
  1. 1
    1
      tsfuncs.h
  2. 2
    4
      tsfuncs_pmt.c

+ 1
- 1
tsfuncs.h View File

@@ -127,7 +127,7 @@ int				ts_get_ecm_info		(struct ts_pmt *pmt, enum CA_system CA_sys, uint16_t *CA
127 127
 // PMT
128 128
 struct ts_pmt *	ts_pmt_alloc		();
129 129
 struct ts_pmt * ts_pmt_alloc_init	(uint16_t org_network_id, uint16_t transport_stream_id);
130
-struct ts_pmt *	ts_pmt_push_packet	(struct ts_pmt *pmt, uint8_t *ts_packet, uint16_t pmt_pid);
130
+struct ts_pmt *	ts_pmt_push_packet	(struct ts_pmt *pmt, uint8_t *ts_packet);
131 131
 void            ts_pmt_free			(struct ts_pmt **pmt);
132 132
 int				ts_pmt_parse		(struct ts_pmt *pmt);
133 133
 void            ts_pmt_dump			(struct ts_pmt *pmt);

+ 2
- 4
tsfuncs_pmt.c View File

@@ -35,13 +35,11 @@ static struct ts_pmt *ts_pmt_reset(struct ts_pmt *pmt) {
35 35
 	return newpmt;
36 36
 }
37 37
 
38
-struct ts_pmt *ts_pmt_push_packet(struct ts_pmt *pmt, uint8_t *ts_packet, uint16_t pmt_pid) {
38
+struct ts_pmt *ts_pmt_push_packet(struct ts_pmt *pmt, uint8_t *ts_packet) {
39 39
 	struct ts_header ts_header;
40 40
 	memset(&ts_header, 0, sizeof(struct ts_header));
41 41
 
42 42
 	if (ts_packet_header_parse(ts_packet, &ts_header)) {
43
-		if (ts_header.pid != pmt_pid)
44
-			goto OUT;
45 43
 		if (!pmt->ts_header.pusi)
46 44
 			pmt->ts_header = ts_header;
47 45
 	}
@@ -196,7 +194,7 @@ struct ts_pmt *ts_pmt_copy(struct ts_pmt *pmt) {
196 194
 	struct ts_pmt *newpmt = ts_pmt_alloc();
197 195
 	int i;
198 196
 	for (i=0;i<pmt->section_header->num_packets; i++) {
199
-		newpmt = ts_pmt_push_packet(newpmt, pmt->section_header->packet_data + (i * TS_PACKET_SIZE), pmt->ts_header.pid);
197
+		newpmt = ts_pmt_push_packet(newpmt, pmt->section_header->packet_data + (i * TS_PACKET_SIZE));
200 198
 	}
201 199
 	if (newpmt->initialized) {
202 200
 		return newpmt;

Loading…
Cancel
Save