Browse Source

Fixed a check for initialized section

Georgi Chorbadzhiyski 13 years ago
parent
commit
7d3c1cb2b7
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      tsfuncs_section_data.c

+ 1
- 1
tsfuncs_section_data.c View File

114
 	memcpy(sec->packet_data + (sec->num_packets * TS_PACKET_SIZE), ts_packet, TS_PACKET_SIZE);
114
 	memcpy(sec->packet_data + (sec->num_packets * TS_PACKET_SIZE), ts_packet, TS_PACKET_SIZE);
115
 	sec->section_pos += to_copy;
115
 	sec->section_pos += to_copy;
116
 	sec->num_packets++;
116
 	sec->num_packets++;
117
-	sec->initialized = (sec->section_pos+1) >= (sec->section_length + 4); // +4 to include the CRC
117
+	sec->initialized = (sec->section_pos+1) >= sec->section_length + 3;
118
 	if (sec->initialized) {
118
 	if (sec->initialized) {
119
 		// CRC is after sec->data[sec->data_len]
119
 		// CRC is after sec->data[sec->data_len]
120
 		sec->CRC = (sec->CRC << 8) | sec->data[sec->data_len + 3];
120
 		sec->CRC = (sec->CRC << 8) | sec->data[sec->data_len + 3];

Loading…
Cancel
Save