|
@@ -112,7 +112,6 @@ ERROR:
|
112
|
112
|
|
113
|
113
|
int ts_nit_parse(struct ts_nit *nit) {
|
114
|
114
|
uint8_t *section_data = nit->section_header->data;
|
115
|
|
- int section_len = nit->section_header->data_len;
|
116
|
115
|
|
117
|
116
|
/* Table data (2 bytes) */
|
118
|
117
|
nit->reserved1 = (section_data[0] &~ 0x0F) >> 4; // xxxx1111
|
|
@@ -120,7 +119,6 @@ int ts_nit_parse(struct ts_nit *nit) {
|
120
|
119
|
|
121
|
120
|
/* Handle streams */
|
122
|
121
|
uint8_t *stream_data = section_data + 2 + nit->network_info_size; // +2 is to compensate for reserved1 and network_info_size
|
123
|
|
- int stream_len = section_len - nit->network_info_size - 4; // -4 for the CRC at the end
|
124
|
122
|
|
125
|
123
|
nit->network_info = NULL;
|
126
|
124
|
if (nit->network_info_size) {
|
|
@@ -135,7 +133,7 @@ int ts_nit_parse(struct ts_nit *nit) {
|
135
|
133
|
nit->ts_loop_size = ((stream_data[0] &~ 0xF0) << 8) | stream_data[1]; // 1111xxxx xxxxxxxx
|
136
|
134
|
|
137
|
135
|
stream_data += 2;
|
138
|
|
- stream_len = nit->ts_loop_size;
|
|
136
|
+ int stream_len = nit->ts_loop_size;
|
139
|
137
|
|
140
|
138
|
while (stream_len > 0) {
|
141
|
139
|
if (nit->streams_num == nit->streams_max) {
|