mpegts: fix sdt length check

It was originally test for 9 bytes (as the comment says) and was
rewritten buggily. So rewrite it a third way, which is now
hopefully consistent with the original and the comment, while
being more sense-making to humans.

Coverity 1139654
This commit is contained in:
Vincent Penquerc'h 2014-04-09 15:54:18 +01:00
parent 931150cb91
commit 8f4123a881

View file

@ -857,7 +857,7 @@ _parse_sdt (GstMpegTsSection * section)
entry_begin = data;
if (sdt_info_length + 5 < 4) {
if (sdt_info_length - 4 < 5) {
/* each entry must be at least 5 bytes (+4 bytes for the CRC) */
GST_WARNING ("PID %d invalid SDT entry size %d",
section->pid, sdt_info_length);