I'm seeing a slow memory leak when using mediaSDK to perform MPEG2 encoding. I see this for both hardware/software with the attached code. In this code the main loops continually processes the same frames and contains no memory allocation. Yet the memory used by the process continually creeps up. The examples below show only 60 seconds of history, but the trend continues in the same manner until memory is exhausted. This can take many hours, but eventually the process will consume all free memory in the machine.
For hardware, the example app generates a sequence like this on my system:
./msdkTest.exe
Using HW version 1.7
6 buffers suggested
Starting frame encode
Elapsed (s) DeltaMemory
0 737280
10 1368064
20 2138112
30 2625536
40 3149824
50 3710976
60 4644864
Likewise for software, I see something like this:
./msdkTest.exe -s
Using SW version 1.8
3 buffers suggested
Starting frame encode
Elapsed (s) DeltaMemory
0 24576
10 36864
20 49152
30 118784
40 184320
50 253952
60 286720
Am I doing something wrong in this simple loop? I've run this same code on a difference machine with HW version 1.4 and SW version 1.7 and there was no leak so I believe my loop is OK.