From 7ef785b7dccd7f77cce210e30d8603baf570d18f Mon Sep 17 00:00:00 2001 From: Arnaud de Turckheim Date: Thu, 3 Sep 2020 19:41:23 +0200 Subject: [PATCH] scte35: fix invalid shift --- scte/35.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scte/35.h b/scte/35.h index 486ff18..95e669b 100644 --- a/scte/35.h +++ b/scte/35.h @@ -780,8 +780,9 @@ static inline uint64_t scte35_seg_desc_get_duration(const uint8_t *p_desc) const uint8_t *p = p_desc + 12; if (!scte35_seg_desc_has_program_seg(p_desc)) p += 1 + 6 * scte35_seg_desc_get_component_count(p_desc); - return ((uint64_t)p[0] << 32) | (p[1] << 24) | (p[2] << 16) | (p[3] < 8) | - p[4]; + return ((uint64_t)p[0] << 32) | ((uint64_t)p[1] << 24) | + ((uint64_t)p[2] << 16) | ((uint64_t)p[3] << 8) | + (uint64_t)p[4]; } #define SCTE35_SEG_DESC_UPID_TYPE_NOT_USED 0x00