Hi All, I created a pipeline that play rtsp stream, the pipeline contains elements rtspsrc, rtph264depay, nvv4l2decoder, nvvidconv etc. Everything work fine for playing rtsp stream. But there is memory leak, when I change rtsp path periodically.
The following are steps to change rtsp path:
- keep nvv4l2decoder at state running
- unlink rtspsrc with rtph264depay, where rtph264dppay connects to downstream elements included nvv4l2decoder
- set rtspsrc state to NULL,
- change rtspsrc path
- link rtspsrc to rtph264depay
- set state of rtspsrc to PLAYING
The above steps able to change rtsp stream to new one, but there is memory leak. I noticed that every time I reconnect to rtph264depay, I got the following debug message:
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
It seems allocating a new NVMM block, but I never see any message that free NVMM block, would this leads to memory leak ? How do I know nvv4l2decoder has freed memory block?
Noted that I tried to set state of nvv4l2deocder to NULL and PLAY again while reconnect to new rtsp stream, but memory leak still persists.