UsingNet / nvcodec-python

MIT License
21 stars 5 forks source link

Cuda out memory issue #5

Open Kisshine007 opened 2 years ago

Kisshine007 commented 2 years ago

When running the program, Cuda memory continues to increase until there is not enough memory to make an error.

I am test using rtsp stream.

Kisshine007 commented 2 years ago

/src/decoder.cpp

@@ -83,5 +83,6 @@ videoFrameList videoDecoder_decode(videoDecoderHandle handle, u_int8_t in, siz cudaMemcpy((void)(frameList->pFrames+iframeList->perFrameSize), (uint8_t*)dpFrame, output_size, cudaMemcpyDeviceToHost); } cuMemFree(dpFrame); cuMemFree(nv12Frame); // Add cuMemFree return frameList; }


After add cuMemFree, the program running is ok.