Memory leak when playing RTSP stream
Summary
Hi,
I am working on Unity app that playing video stream via rtsp:// from local video camera and I have noticed that the memory grows a little bit each hour and it isn't released even when video is stopped. This issue might be related to #54
Here is the comparisson snapshot of profiler when profiling VLC Player Example (Canvas) the sample with video stream case for ~7h. You can see that native memory grew for 23MB.
From memory details there is indication that something in native code is allocating memory.
Minimal project and steps to reproduce
The issue can be reproduced by starting VLC Player Example (Canvas) from provided samples and starting rtsp:// stream the memory will slowly grow when video is streaming indefinitely.
What is the current bug behavior?
Currently when playing video stream the memory grows, causing app memory to grow and eventually crash the application.
What is the expected correct behavior?
Even though video stream might play for days the memory should not grow.
Does it work on other plaforms? Does it work with the official VLC apps?
This was only tested on Windows 11, with Unity 2021.3.30f1 and Unity 2022.3.9f1. In official apps VLCPlayer 3.0 we could not reproduce this in VLC Player 4.0 this could also not be reproduced.
Environment
- OS: Windows
- Version: 11
- Device: PC
- LibVLC version and architecture 4.0.0.0
- LibVLCSharp version: 4.0.0.0
- VLC Unity plugin version: 0.1.8
- Scripting backend used: Mono