Browse Source

Fixes incorrect check for payload_offset

lars18th 1 year ago
parent
commit
6fb0de0bb7
No account linked to committer's email
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tsfuncs.c

+ 1 - 1
tsfuncs.c View File

@@ -265,7 +265,7 @@ uint8_t *ts_packet_header_parse(uint8_t *ts_packet, struct ts_header *ts_header)
265 265
 	if (!ts_header->payload_field && ts_header->adapt_len > 183)
266 266
 		goto return_error;
267 267
 
268
-	if (ts_header->payload_offset > TS_MAX_PAYLOAD_SIZE) // Validity check
268
+	if (ts_header->payload_offset > TS_PACKET_SIZE) // Validity check
269 269
 		goto return_error;
270 270
 
271 271
 	ts_header->payload_size = TS_PACKET_SIZE - ts_header->payload_offset;