[FFmpeg-cvslog] libavcodec/dynamic_hdr_vivid: fix start code check

Zhao Zhili git at videolan.org
Fri Mar 17 05:12:36 EET 2023


ffmpeg | branch: master | Zhao Zhili <zhilizhao at tencent.com> | Fri Mar 17 18:51:16 2023 +0800| [ac5dffdfe68645ad69af049bb6402eeb3c8ba318] | committer: Zhao Zhili

libavcodec/dynamic_hdr_vivid: fix start code check

Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac5dffdfe68645ad69af049bb6402eeb3c8ba318
---

 libavcodec/dynamic_hdr_vivid.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/dynamic_hdr_vivid.c b/libavcodec/dynamic_hdr_vivid.c
index f2bc0c9059..9847b88e61 100644
--- a/libavcodec/dynamic_hdr_vivid.c
+++ b/libavcodec/dynamic_hdr_vivid.c
@@ -46,7 +46,8 @@ int ff_parse_itu_t_t35_to_dynamic_hdr_vivid(AVDynamicHDRVivid *s, const uint8_t
         return AVERROR_INVALIDDATA;
 
     s->system_start_code = get_bits(gb, 8);
-    if (s->system_start_code == 0x01) {
+    // T/UWA 005.1-2022, table 11
+    if (s->system_start_code >= 0x01 && s->system_start_code <= 0x07) {
         s->num_windows = 1;
 
         if (get_bits_left(gb) < 12 * 4 * s->num_windows)



More information about the ffmpeg-cvslog mailing list