Browse Source

nit: Remove unused variables.

Georgi Chorbadzhiyski 9 years ago
parent
commit
1d4eb61e13
1 changed files with 1 additions and 3 deletions
  1. 1
    3
      nit.c

+ 1
- 3
nit.c View File

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

Loading…
Cancel
Save