From a48fc69caffd71fbd6739620e608acfff8657723 Mon Sep 17 00:00:00 2001 From: jeffqjiangNew <142832361+jeffqjiangNew@users.noreply.github.com> Date: Tue, 27 Feb 2024 17:37:32 -0500 Subject: [PATCH] * rocDecode/AVC: Fixed a bug in more RBSP data check function. (#263) --- src/parser/avc_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/avc_parser.cpp b/src/parser/avc_parser.cpp index 20dfb0bb27..7d02604e35 100644 --- a/src/parser/avc_parser.cpp +++ b/src/parser/avc_parser.cpp @@ -1480,7 +1480,7 @@ bool AvcVideoParser::MoreRbspData(uint8_t *p_stream, size_t stream_size_in_byte, bool more_rbsp_bits = false; uint8_t curr_byte = p_stream[bit_offset >> 3]; uint8_t next_bytes[3]; - uint32_t next_byte_offset = (bit_offset + 7) >> 3; + uint32_t next_byte_offset = (bit_offset >> 3) + 1; int bit_offset_in_byte = bit_offset % 8; /// If the following bytes are not start code, we have more RBSP data. If we don't have enough bytes