decodeToFd memory leak


I found memory leak using decodeToFd blew.

while(1) {
          ret = ctx.jpegdec->decodeToFd(fd, ctx.in_buffer, ctx.in_file_size, pixfmt,
          width, height);
          //      cout << "test " << endl;

Please check the attached file and excute blew

./jpeg_decode  num_files 1 baboon.jpg out.raw --decode-fd
head /etc/nv_tegra_release
# R32 (release), REVISION: 2.1, GCID: 16294929, BOARD: t186ref, EABI: aarch64, DATE: Tue Aug 13 04:45:36 UTC 2019 (619 KB)

Thanks for reporting the issue. It is known and we have a quick solution in
[MMAPI][DS4.0] Memory leak in MJPEG decoding

Please give it a try.

Hi DaneLLL

I tried r32.2.3. Memory leak still occured.

please check tegrastats log file and code attached. (16.4 KB) (619 KB)

You still need the prebuilt lib on r32.2.3. Please replace it and give it a try.