From d3c573a6768b0e92bef25cf21d102786a08de6a3 Mon Sep 17 00:00:00 2001 From: Vladimir Yakovlev Date: Fri, 22 Jun 2012 10:27:13 +0400 Subject: [PATCH] Issue with bit 33 in PCR Corrected issue of lost bit in PCR due to bit shift more then 32 bit. --- mpeg/ts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpeg/ts.h b/mpeg/ts.h index 4bcedc5..c343916 100644 --- a/mpeg/ts.h +++ b/mpeg/ts.h @@ -250,7 +250,7 @@ static inline bool tsaf_has_pcr(const uint8_t *p_ts) static inline uint64_t tsaf_get_pcr(const uint8_t *p_ts) { - return (p_ts[6] << 25) | (p_ts[7] << 17) | (p_ts[8] << 9) | (p_ts[9] << 1) | + return ((uint64_t) p_ts[6] << 25) | (p_ts[7] << 17) | (p_ts[8] << 9) | (p_ts[9] << 1) | (p_ts[10] >> 7); }