From 08bc65c142498a4b8d046032b66b3d42a3abf65d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 25 Nov 2026 23:04:16 +0300 Subject: [PATCH] vk-video-ffi H.264 decode: create the session with the driver's DPB slot and active reference maxima The session was sized with the stream's DPB slot count and active reference count (5/5 for these streams). The driver sizes session memory from those numbers, and a session that is too small corrupts decoding after an earlier session on the same device. ffmpeg creates sessions with the driver caps. DPB image count stays stream-sized. --- shims/vk-video-ffi/src/h264_decode.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shims/vk-video-ffi/src/h264_decode.rs b/shims/vk-video-ffi/src/h264_decode.rs index a0ba53f4..fc0cd9fe 100644 --- a/shims/vk-video-ffi/src/h264_decode.rs +++ b/shims/vk-video-ffi/src/h264_decode.rs @@ -268,8 +268,8 @@ impl H264DecodeSession { &profile.info, &caps.std_header_version, max_extent, - cfg.max_dpb_slots, - max_active, + caps.max_dpb_slots, + caps.max_active_refs, )?; let dec = Decoder::new( vs,