[FFmpeg-devel] [PATCH] avcodec/cbs_av1: add a range check to tg_end
James Almer
jamrial at gmail.com
Tue Oct 27 15:49:39 EET 2020
Section 6.10.1 of the AV1 spec states:
It is a requirement of bitstream conformance that the value of tg_end is greater than or equal to tg_start.
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavcodec/cbs_av1_syntax_template.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
index 2df5619279..63b4db7853 100644
--- a/libavcodec/cbs_av1_syntax_template.c
+++ b/libavcodec/cbs_av1_syntax_template.c
@@ -1785,7 +1785,7 @@ static int FUNC(tile_group_obu)(CodedBitstreamContext *ctx, RWContext *rw,
tile_bits = cbs_av1_tile_log2(1, priv->tile_cols) +
cbs_av1_tile_log2(1, priv->tile_rows);
fb(tile_bits, tg_start);
- fb(tile_bits, tg_end);
+ fc(tile_bits, tg_end, current->tg_start, MAX_UINT_BITS(tile_bits));
}
CHECK(FUNC(byte_alignment)(ctx, rw));
--
2.28.0
More information about the ffmpeg-devel
mailing list