Browse Source

Fixed a check for initialized section

Georgi Chorbadzhiyski 9 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,7 +114,7 @@ void ts_section_add_packet(struct ts_section_header *sec, struct ts_header *ts_h
114 114
 	memcpy(sec->packet_data + (sec->num_packets * TS_PACKET_SIZE), ts_packet, TS_PACKET_SIZE);
115 115
 	sec->section_pos += to_copy;
116 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 118
 	if (sec->initialized) {
119 119
 		// CRC is after sec->data[sec->data_len]
120 120
 		sec->CRC = (sec->CRC << 8) | sec->data[sec->data_len + 3];

Loading…
Cancel
Save