Fix double stop in ANSVideoPlayer

This commit is contained in:
2026-04-22 10:10:16 +10:00
parent 97d814936d
commit 57cc8e0a56
14 changed files with 492 additions and 70 deletions

View File

@@ -1167,7 +1167,12 @@ trt_cache_create_context:
// -- Pinned output buffers (CUDA graph prerequisite) -----------------------
// Invalidate any graphs captured by a previous loadNetwork() call on this instance.
for (auto& [bs, ge] : m_graphExecs) { if (ge) cudaGraphExecDestroy(ge); }
for (auto& [bs, ge] : m_graphExecs) {
if (ge) {
cudaGraphExecDestroy(ge);
m_trtGraphDestroys.fetch_add(1, std::memory_order_relaxed);
}
}
m_graphExecs.clear();
// Free any previously allocated pinned buffers.
for (T* p : m_pinnedOutputBuffers) { if (p) cudaFreeHost(p); }