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
 // PMT
127
 // PMT
128
 struct ts_pmt *	ts_pmt_alloc		();
128
 struct ts_pmt *	ts_pmt_alloc		();
129
 struct ts_pmt * ts_pmt_alloc_init	(uint16_t org_network_id, uint16_t transport_stream_id);
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
 void            ts_pmt_free			(struct ts_pmt **pmt);
131
 void            ts_pmt_free			(struct ts_pmt **pmt);
132
 int				ts_pmt_parse		(struct ts_pmt *pmt);
132
 int				ts_pmt_parse		(struct ts_pmt *pmt);
133
 void            ts_pmt_dump			(struct ts_pmt *pmt);
133
 void            ts_pmt_dump			(struct ts_pmt *pmt);

+ 2
- 4
tsfuncs_pmt.c View File

35
 	return newpmt;
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
 	struct ts_header ts_header;
39
 	struct ts_header ts_header;
40
 	memset(&ts_header, 0, sizeof(struct ts_header));
40
 	memset(&ts_header, 0, sizeof(struct ts_header));
41
 
41
 
42
 	if (ts_packet_header_parse(ts_packet, &ts_header)) {
42
 	if (ts_packet_header_parse(ts_packet, &ts_header)) {
43
-		if (ts_header.pid != pmt_pid)
44
-			goto OUT;
45
 		if (!pmt->ts_header.pusi)
43
 		if (!pmt->ts_header.pusi)
46
 			pmt->ts_header = ts_header;
44
 			pmt->ts_header = ts_header;
47
 	}
45
 	}
196
 	struct ts_pmt *newpmt = ts_pmt_alloc();
194
 	struct ts_pmt *newpmt = ts_pmt_alloc();
197
 	int i;
195
 	int i;
198
 	for (i=0;i<pmt->section_header->num_packets; i++) {
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
 	if (newpmt->initialized) {
199
 	if (newpmt->initialized) {
202
 		return newpmt;
200
 		return newpmt;

Loading…
Cancel
Save