Fix double stops
This commit is contained in:
@@ -128,8 +128,11 @@ namespace ANSCENTER {
|
||||
// close() destroys the NVDEC decoder ONLY. Pool slot buffers
|
||||
// (regular cudaMallocPitch allocations) are untouched — they
|
||||
// belong to the global GpuNV12SlotPool, not the decoder.
|
||||
// reset() runs ~CRtspPlayer which calls close() exactly once —
|
||||
// do NOT call close() explicitly here (the destructor would call
|
||||
// it again, which re-enters torn-down decoder state).
|
||||
if (clientToClose) {
|
||||
clientToClose->close();
|
||||
clientToClose.reset();
|
||||
|
||||
// Force CUDA runtime to release all cached memory from the destroyed
|
||||
// NVDEC decoder. Without this, cuMemFree returns memory to the CUDA
|
||||
|
||||
Reference in New Issue
Block a user