ViveSoftware / ViveMediaDecoder

A high performance video decoding Unity plugin for Windows.
http://u3d.as/usf
Other
129 stars 36 forks source link

Using multi-channel audio support causes memory leaks #12

Open OlafZwe opened 6 years ago

OlafZwe commented 6 years ago

A (native) memory leak occurs when using the following setup: Enabling all audio channels by initializing the decoder with enableAllAudioCh = true. Pulling that multi-channel audio data using the C# function getAllAudioChannelData.

This memory leak appears to occurs both when testing in the Unity editor, as well as in a standalone Windows build of the Unity app.

kyo8568131 commented 6 years ago

Hi OlafZwe, Thanks for the feedback. I'll check and fix it.

kyo8568131 commented 6 years ago

Hi, I had tried, but I can't find memory leak. Could you help to provide more details and the test video? Thanks.

OlafZwe commented 6 years ago

To reproduce the memory leak (and CPU usage spike), make the following changes to the Demo scene:

Running this Demo scene spikes CPU and memory usage, and this usage does not go down when stopping the scene in the editor.

kyo8568131 commented 6 years ago

I do the same thing but the memory usage didn't raise over time. So I think it may be not an issue of memory leak. I'll keep monitoring it, thanks.