From c22a635938c4df93bde6d0b6d4726f4a99c7dbd8 Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Thu, 20 Mar 2025 16:33:27 +0900 Subject: [PATCH] vulkan/video: Do byte-alignment when building a h264 slice header Fixes: ff8de6190 ("vulkan/video: adds a bitstream writer of h264 slice header") Closes: mesa/mesa#12835 Signed-off-by: Hyunjun Ko Acked-by: Lionel Landwerlin Part-of: --- src/vulkan/runtime/vk_video.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vulkan/runtime/vk_video.c b/src/vulkan/runtime/vk_video.c index 1791a676278..aa3ee5da951 100644 --- a/src/vulkan/runtime/vk_video.c +++ b/src/vulkan/runtime/vk_video.c @@ -2258,6 +2258,7 @@ vk_video_encode_h264_slice_header(const StdVideoEncodeH264PictureInfo *pic_info, assert(is_aligned); } + vl_bitstream_rbsp_trailing(&enc); vl_bitstream_flush(&enc); *data_size_ptr += vl_bitstream_get_byte_count(&enc); vl_bitstream_encoder_free(&enc);