From 2e37c440fda3d437b3bc0ac10e64c9f77f8f9952 Mon Sep 17 00:00:00 2001 From: Christophe Massiot Date: Mon, 24 Jan 2011 18:27:17 +0000 Subject: [PATCH] * mpeg/psi.h: Be more leniant towards invalid PATs. --- mpeg/psi.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mpeg/psi.h b/mpeg/psi.h index a5dafe8..11585cc 100644 --- a/mpeg/psi.h +++ b/mpeg/psi.h @@ -899,10 +899,12 @@ static inline bool pat_table_validate(uint8_t **pp_sections) return false; while ((p_program = pat_get_program(p_section, j)) != NULL) { + uint8_t *p_program2 = pat_table_find_program(pp_sections, + patn_get_program(p_program)); j++; - /* check that the program number is not already in the table */ - if (pat_table_find_program(pp_sections, - patn_get_program(p_program)) != p_program) + /* check that the program number is not already in the table + * with another PID */ + if (patn_get_pid(p_program) != patn_get_pid(p_program2)) return false; } }