[bTSstream-devel] [Git][videolan/bitstream][master] 2 commits: scte35: fix segmentation descriptor sub_segment

Christophe Massiot gitlab at videolan.org
Fri Dec 4 13:58:11 CET 2020



Christophe Massiot pushed to branch master at VideoLAN / bitstream


Commits:
287bc2c1 by Arnaud de Turckheim at 2020-12-04T13:50:17+01:00
scte35: fix segmentation descriptor sub_segment

- - - - -
96cdd783 by Christophe Massiot at 2020-12-04T13:57:56+01:00
Merge branch 'quarium-scte35'

- - - - -


1 changed file:

- scte/35.h


Changes:

=====================================
scte/35.h
=====================================
@@ -1258,7 +1258,8 @@ static inline bool scte35_seg_desc_has_sub_num(const uint8_t *p_desc)
         p += 5;
     p += 2;
     p += scte35_seg_desc_get_upid_length(p_desc);
-    if (p + 3 < p_desc + scte35_splice_desc_get_length(p_desc))
+    if (p + 3 <
+        p_desc + scte35_splice_desc_get_length(p_desc) + DESC_HEADER_SIZE)
         return true;
     return false;
 }
@@ -1279,7 +1280,8 @@ static inline uint8_t scte35_seg_desc_get_sub_num(const uint8_t *p_desc)
         p += 5;
     p += 2;
     p += scte35_seg_desc_get_upid_length(p_desc);
-    if (p + 3 < p_desc + scte35_splice_desc_get_length(p_desc))
+    if (p + 3 <
+        p_desc + scte35_splice_desc_get_length(p_desc) + DESC_HEADER_SIZE)
         return p[3];
     return 0;
 }
@@ -1300,7 +1302,8 @@ static inline void scte35_seg_desc_set_sub_num(uint8_t *p_desc, uint8_t value)
         p += 5;
     p += 2;
     p += scte35_seg_desc_get_upid_length(p_desc);
-    if (p + 3 < p_desc + scte35_splice_desc_get_length(p_desc))
+    if (p + 3 <
+        p_desc + scte35_splice_desc_get_length(p_desc) + DESC_HEADER_SIZE)
         p[3] = value;
 }
 
@@ -1320,7 +1323,8 @@ static inline bool scte35_seg_desc_has_sub_expected(const uint8_t *p_desc)
         p += 5;
     p += 2;
     p += scte35_seg_desc_get_upid_length(p_desc);
-    if (p + 4 < p_desc + scte35_splice_desc_get_length(p_desc))
+    if (p + 4 <
+        p_desc + scte35_splice_desc_get_length(p_desc) + DESC_HEADER_SIZE)
         return true;
     return false;
 }
@@ -1341,7 +1345,8 @@ static inline uint8_t scte35_seg_desc_get_sub_expected(const uint8_t *p_desc)
         p += 5;
     p += 2;
     p += scte35_seg_desc_get_upid_length(p_desc);
-    if (p + 4 < p_desc + scte35_splice_desc_get_length(p_desc))
+    if (p + 4 <
+        p_desc + scte35_splice_desc_get_length(p_desc) + DESC_HEADER_SIZE)
         return p[4];
     return 0;
 }
@@ -1363,7 +1368,8 @@ static inline void scte35_seg_desc_set_sub_expected(uint8_t *p_desc,
         p += 5;
     p += 2;
     p += scte35_seg_desc_get_upid_length(p_desc);
-    if (p + 4 < p_desc + scte35_splice_desc_get_length(p_desc))
+    if (p + 4 <
+        p_desc + scte35_splice_desc_get_length(p_desc) + DESC_HEADER_SIZE)
         p[4] = value;
 }
 



View it on GitLab: https://code.videolan.org/videolan/bitstream/-/compare/f1cb6b396300976a7819e8dcbf65d252ae7e72d5...96cdd783c50631f3d17bf5e2c7f3ec5468db3931

-- 
View it on GitLab: https://code.videolan.org/videolan/bitstream/-/compare/f1cb6b396300976a7819e8dcbf65d252ae7e72d5...96cdd783c50631f3d17bf5e2c7f3ec5468db3931
You're receiving this email because of your account on code.videolan.org.




More information about the biTStream-devel mailing list