[FFmpeg-devel] [PATCH 2/5] av1_parser: do not check buf_size if we have size in obu header

Xu Guangxin guangxin.xu at intel.com
Thu Aug 6 11:04:13 EEST 2020


for low overhead obu, we can't forsee the obu size. we can only get it
when we parsed the obu header.
---
 libavcodec/av1_parse.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/av1_parse.h b/libavcodec/av1_parse.h
index a3b39f039c..823bdedd5e 100644
--- a/libavcodec/av1_parse.h
+++ b/libavcodec/av1_parse.h
@@ -135,7 +135,7 @@ static inline int parse_obu_header(const uint8_t *buf, int buf_size,
 
     size = *obu_size + *start_pos;
 
-    if (size > buf_size)
+    if (!*has_size_flag && size > buf_size)
         return AVERROR_INVALIDDATA;
 
     return size;
-- 
2.17.1



More information about the ffmpeg-devel mailing list