Browse Source

Add check for section_length

Georgi Chorbadzhiyski 9 years ago
parent
commit
604cdbff6b
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      tsfuncs_section_data.c

+ 3
- 0
tsfuncs_section_data.c View File

@@ -98,6 +98,9 @@ void ts_section_data_gen_ts_packets(struct ts_header *ts_header, uint8_t *sectio
98 98
 
99 99
 void ts_section_add_packet(struct ts_section_header *sec, struct ts_header *ts_header, uint8_t *ts_packet) {
100 100
 	uint8_t payload_offset = ts_header->payload_offset;
101
+	if (!sec->section_length)
102
+		return;
103
+
101 104
 	if (ts_header->pusi) {
102 105
 		payload_offset += sec->pointer_field + 1; // Pointer field
103 106
 	}

Loading…
Cancel
Save