[fix] fix nvcodec crash due to cuda context not being released

This commit is contained in:
dijunkun
2025-04-10 17:10:40 +08:00
parent f48d940b80
commit d40ca8814c
5 changed files with 23 additions and 16 deletions

View File

@@ -22,6 +22,8 @@ class NvidiaVideoDecoder : public VideoDecoder {
private:
std::shared_ptr<SystemClock> clock_ = nullptr;
NvDecoder* decoder = nullptr;
CUcontext cuda_context_ = NULL;
CUdevice cuda_device_ = 0;
bool get_first_keyframe_ = false;
bool skip_frame_ = false;