[bTSstream-devel] desc_69: fix off-by-one error in day

Christophe Massiot git at videolan.org
Sat Sep 5 17:28:34 CEST 2015


bitstream | branch: master | Christophe Massiot <cmassiot at openheadend.tv> | Thu Sep  3 16:32:00 2015 +0200| [51a3afb1d6ff2264872eecd76dfacb9b0484cbb0] | committer: Christophe Massiot

desc_69: fix off-by-one error in day

> http://git.videolan.org/gitweb.cgi/bitstream.git/?a=commit;h=51a3afb1d6ff2264872eecd76dfacb9b0484cbb0
---

 dvb/si/desc_69.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dvb/si/desc_69.h b/dvb/si/desc_69.h
index 4a66fa3..93a868a 100644
--- a/dvb/si/desc_69.h
+++ b/dvb/si/desc_69.h
@@ -68,7 +68,7 @@ static inline void desc69_set_pil(uint8_t *p_desc, uint32_t i_pil)
 static inline uint8_t desc69_get_day(const uint8_t *p_desc)
 {
     uint8_t i_day = ((p_desc[2] & 0x0f) << 1) | ((p_desc[3] & 0x80) >> 7); // rrrr1111 1xxxxxxx
-    return i_day + 1;
+    return i_day;
 }
 
 static inline void desc69_set_day(uint8_t *p_desc, uint8_t i_day)



More information about the biTStream-devel mailing list