Update IDR handler to explicitly handle dropped IDR frames and ignore dropped non-reference frames.

This commit is contained in:
BERADQ
2025-12-04 15:59:18 +01:00
committed by xytovl
parent a37498eedf
commit d1308bfbb8
3 changed files with 31 additions and 4 deletions
+3
View File
@@ -511,6 +511,9 @@ std::optional<video_encoder::data> video_encoder_nvenc::encode(uint8_t slot, uin
};
NVENC_CHECK(shared_state->fn.nvEncLockBitstream(session_handle, &buf_lock_params));
if (buf_lock_params.pictureType == NV_ENC_PIC_TYPE_NONREF_P)
idr_handler.set_non_ref(frame_index);
CU_CHECK(shared_state->cuda_fn->cuCtxPopCurrent(NULL));
return data{
.encoder = this,