From 88c3ef38be4c3aacd653a21f10ca28e5ec72ddee Mon Sep 17 00:00:00 2001 From: Christophe Massiot Date: Thu, 10 Oct 2013 14:41:12 +0200 Subject: [PATCH] fix psi_get_version Version is 5 bits instead of 4 bits, as reported by Sebastien (Coexsi). --- mpeg/psi/psi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpeg/psi/psi.h b/mpeg/psi/psi.h index 7d287b2..56b6d59 100644 --- a/mpeg/psi/psi.h +++ b/mpeg/psi/psi.h @@ -220,7 +220,7 @@ static inline void psi_set_version(uint8_t *p_section, uint8_t i_version) static inline uint8_t psi_get_version(const uint8_t *p_section) { - return (p_section[5] & 0x1e) >> 1; + return (p_section[5] & 0x3e) >> 1; } static inline void psi_set_current(uint8_t *p_section)