From 9ab8dddf1f2e1ffb7ee24b550173247f7c63c692 Mon Sep 17 00:00:00 2001 From: James Almer Date: Sat, 18 May 2024 11:49:43 -0300 Subject: [PATCH] avformat/vvc: use align_get_bits() where useful Signed-off-by: James Almer --- libavformat/vvc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libavformat/vvc.c b/libavformat/vvc.c index 19143f85dd..449c933881 100644 --- a/libavformat/vvc.c +++ b/libavformat/vvc.c @@ -191,15 +191,13 @@ static void vvcc_parse_ptl(GetBitContext *gb, general_ptl.num_bytes_constraint_info = j; skip_bits(gb, gci_num_reserved_bits); } - while (gb->index % 8 != 0) - skip_bits1(gb); + align_get_bits(gb); } for (int i = max_sub_layers_minus1 - 1; i >= 0; i--) general_ptl.ptl_sublayer_level_present_flag[i] = get_bits1(gb); - while (gb->index % 8 != 0) - skip_bits1(gb); + align_get_bits(gb); for (int i = max_sub_layers_minus1 - 1; i >= 0; i--) { if (general_ptl.ptl_sublayer_level_present_flag[i]) @@ -307,8 +305,7 @@ static int vvcc_parse_vps(GetBitContext *gb, vps_ptl_max_tid[i] = vps_max_sublayers_minus1; } - while (gb->index % 8 != 0) - skip_bits1(gb); + align_get_bits(gb); for (int i = 0; i <= vps_num_ptls_minus1; i++) vvcc_parse_ptl(gb, vvcc, vps_pt_present_flag[i], vps_ptl_max_tid[i]);