mpegtbase: ECM/CA sections don't have a CRC

So don't check for it :)

Also add a bit more info in the warning message to speed up detecting
whether it's a false-positive or not.
This commit is contained in:
Edward Hervey 2012-06-01 16:29:03 +02:00
parent 8d6aed5297
commit 9f7e70f754

View file

@ -1071,10 +1071,12 @@ mpegts_base_handle_psi (MpegTSBase * base, MpegTSPacketizerSection * section)
GstStructure *structure = NULL; GstStructure *structure = NULL;
/* table ids 0x70 - 0x73 do not have a crc */ /* table ids 0x70 - 0x73 do not have a crc */
if (G_LIKELY (section->table_id < 0x70 || section->table_id > 0x73)) { if (G_LIKELY ((section->table_id < 0x70 || section->table_id > 0x73)
&& (section->table_id < 0x80 || section->table_id > 0x8f))) {
if (G_UNLIKELY (mpegts_base_calc_crc32 (section->data, if (G_UNLIKELY (mpegts_base_calc_crc32 (section->data,
section->section_length) != 0)) { section->section_length) != 0)) {
GST_WARNING_OBJECT (base, "bad crc in psi pid 0x%x", section->pid); GST_WARNING_OBJECT (base, "bad crc in psi pid 0x%x (table_id:0x%x)",
section->pid, section->table_id);
return FALSE; return FALSE;
} }
} }