Page 1 of 1

memory leak when using ffmpeg h264_qsv

Posted: Mon Jul 15, 2019 2:33 pm
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:
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.