memory leak when using ffmpeg h264_qsv

For the developers that use FFmpeg in their software.
Post Reply
evenstar
Posts: 2
Joined: Thu Oct 11, 2018 10:04 am

memory leak when using ffmpeg h264_qsv

Post by evenstar »

Recently, I am working with h264 encoder API, found one thing that when i use nvenc and x264 encoder, no problem; while if i switch encoder to intel_qsv, and under some special resolution like 1280 x 704, get the memory leak like blow image:
https://imgur.com/gallery/Hj6Djsu
I looked into the function submit_frame in qsvenc.c file and found out that when frame's width and height are multiples of 32, the code will run the else branch in line 1242. The code here av_frame_ref(qf->frame, frame) will increase reference counter for qf, but i can not found decrease counter anywhere. So is it the reason that lead the memory leak? I changed my input frame' w and h to other size than satisfy multiples of 32, also get memory leak.
Please have a check and help me, thank you.
Appreciate your help.

Post Reply