|
|
|
|
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];
|