Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Memory Leak in Intel VPL Hello-Encode-JPEG Sample

Bhuvin
Beginner
436 Views

Hi all,

I’ve been working with the hello-encode-jpeg sample from the Intel VPL GitHub repository (2.x API with internal memory management) and noticed a memory leak when modifying it to run in an infinite loop by resetting the input file pointer. I’d appreciate any insights on whether this is a bug in the sample, my modification, or expected behavior—and how to fix it properly.

To achieve continuous encoding , I added fseek(source, 0, SEEK_SET) after ReadRawFrame_InternalMem to reset the file pointer, keeping the while (isStillGoing) loop running. I'm observing a memory leak of ~100mb/min. 

Here is the original hello-encode-jpeg implementation.
https://github.com/intel/libvpl/blob/main/examples/api2x/hello-encode-jpeg/src/hello-encode-jpeg.cpp

And I have attached my modified version of the implementation.

Windows 11. Intel Iris Xe Graphics 31.0.101.4502




Labels (1)
3 Replies
mradul
Beginner
400 Views

I have faced similar issue

MountainDewd
Beginner
355 Views

I am running into a similar problem

0 Kudos
kumak
Beginner
355 Views

We wrote code based on the same sample and we have similar memory leak. Alot of time spent in using classical ways of matching allocation to deallocations but it is not clear why the memory leak remains. We first were blaming our code. But now it appears that the sample also shows a memory leak. Thanks @Bhuvin  for reporting. 
Has any one been able to solve it yet ?

0 Kudos
Reply